http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47199
Summary: [C++0x] ICE: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 with -fno-elide-constructors Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Created attachment 22917 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22917 reduced testcase Compiler output: $ gcc -std=c++0x -fno-elide-constructors pr47199.C pr47199.C:14:34: in constexpr expansion of 'S<<anonymous> >::s [with int <anonymous> = 0, S<<anonymous> > = S<0>]()' pr47199.C:14:36: in constexpr expansion of 'S<0>((*(const S<0>*)(& S<0>(-0x00000000000000001))))' pr47199.C:14:36: internal compiler error: tree check: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. May be related to PR47041, small changes to the testcase result in ICE described there. Tested revisions: r168535 - crash r165699 - code is rejected Testcase was reduced from libstdc++-v3/testsuite/20_util/duration/comparison_operators/constexpr.cc, it fails with the same ICE