The following invalid code snippet triggers an ICE on trunk (when compiled with "-std=c++0x"): ======================================= struct A { A(int); }; struct B : A {}; constexpr int foo(B) { return 0; } ======================================= bug.cc: In function 'constexpr int foo(B)': bug.cc:8:15: error: invalid type for parameter 1 of constexpr function 'constexpr int foo(B)' bug.cc:6:8: note: 'B' is not literal because: bug.cc:6:8: note: 'B' is not an aggregate, does not have a trivial default constructor, and has no constexpr constructor that is not a copy or move constructor bug.cc:8:34: internal compiler error: Segmentation fault Please submit a full bug report, [etc.]
Confirmed.
On it.
Author: paolo Date: Sun Jan 29 21:41:54 2012 New Revision: 183684 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183684 Log: /cp 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51327 * class.c (explain_non_literal_class): Correctly handle implicitly deleted constructors. /testsuite 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51327 * g++.dg/cpp0x/constexpr-ice6.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ice6.C Modified: trunk/gcc/cp/class.c
Author: paolo Date: Sun Jan 29 21:42:56 2012 New Revision: 183685 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183685 Log: /cp 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51327 * class.c (explain_non_literal_class): Correctly handle implicitly deleted constructors. /testsuite 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51327 * g++.dg/cpp0x/constexpr-ice6.C: New. Modified: trunk/gcc/cp/ChangeLog trunk/gcc/testsuite/ChangeLog
Done.