mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-16 13:50:07 +08:00
re PR c++/68348 (ICE: segfault in cxx_eval_constant_expression at cp/constexpr.c:3172)
PR c++/68348 * g++.dg/cpp0x/pr68348.C: New test. From-SVN: r231524
This commit is contained in:
parent
f680334141
commit
da8006f341
@ -1,3 +1,8 @@
|
||||
2015-12-10 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/68348
|
||||
* g++.dg/cpp0x/pr68348.C: New test.
|
||||
|
||||
2015-12-10 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/specs/elab4.ads: New test.
|
||||
|
18
gcc/testsuite/g++.dg/cpp0x/pr68348.C
Normal file
18
gcc/testsuite/g++.dg/cpp0x/pr68348.C
Normal file
@ -0,0 +1,18 @@
|
||||
// PR c++/68348
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct C {
|
||||
constexpr C() : w(), x(), y() {}
|
||||
constexpr double fn() const noexcept;
|
||||
double w;
|
||||
double x;
|
||||
double y;
|
||||
};
|
||||
|
||||
constexpr double C::fn() const noexcept { return w; }
|
||||
C foo()
|
||||
{
|
||||
C c;
|
||||
c.fn ();
|
||||
return c;
|
||||
}
|
Loading…
Reference in New Issue
Block a user