From d33a8058b3f4b84a55586821b20d06982805364f Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sun, 27 Feb 2011 13:20:55 +0000 Subject: [PATCH] re PR c++/46466 ([C++0X] ICE when using constexpr with -fno-elide-constructors) 2011-02-27 Paolo Carlini PR c++/46466 * g++.dg/cpp0x/constexpr-ctor8.C: New. From-SVN: r170538 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f1f0bc612b4..f670f3826ff 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-02-27 Paolo Carlini + + PR c++/46466 + * g++.dg/cpp0x/constexpr-ctor8.C: New. + 2011-02-27 Jakub Jelinek PR fortran/47886 diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C new file mode 100644 index 00000000000..81fc83737bc --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C @@ -0,0 +1,6 @@ +// PR c++/46466 +// { dg-options "-std=c++0x -fno-elide-constructors" } + +struct S { bool b; }; +constexpr S f() { return S{true}; } +static_assert(f().b, ""); -- 2.30.2