------- Comment #12 from reichelt at gcc dot gnu dot org 2006-07-12 15:03 ------- Reduced (from PR 28219) testcase:
============================= template<int> struct A { enum { a, b = a }; void foo(A<b>); }; ============================= bug.h:4: internal compiler error: tree check: expected integer_cst, have const_decl in tree_int_cst_sgn, at tree.c:4517 Please submit a full bug report, [etc.] If I replace "A<b>" by "A<a>" I get a segfault instead. The testcase crashes since GCC 4.0.0. The code compiles fine if I compile it as regular C++ file and not as C++-header. -- reichelt at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |reichelt at gcc dot gnu dot | |org Keywords| |monitored Summary|[4.2 regression] ICE in |[4.0/4.1/4.2 regression] ICE |tree_int_cst_sgn |in tree_int_cst_sgn Target Milestone|4.2.0 |4.0.4 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28217