The following valid code snippet triggers an ICE on trunk when compiled with "-flto -g":
========================== struct A { virtual ~A(); }; void foo() { struct B : A {}; B b; } ========================== bug.cc: In member function 'B': bug.cc:8:16: internal compiler error: tree check: expected class 'type', have 'declaration' (function_decl) in gen_type_die_with_usage, at dwarf2out.c:18739 Please submit a full bug report, [etc.] -- Summary: ICE declaring local class Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, lto Severity: normal Priority: P3 Component: debug 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=42425