The following valid code snippet triggers an ICE since GCC 3.4.0: ============================================ template<int> struct A { enum { a, b = a }; void foo(A<b>) __attribute((weak)); }; ============================================
bug.cc:5: internal compiler error: tree check: expected integer_cst, have const_decl in tree_int_cst_sgn, at tree.c:3340 Please submit a full bug report, [etc.] -- Summary: [4.3 regression] ICE with attribute weak Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34937