Using a recent gcc build (4.2.0 20060418) the following code: template <class foo> class junk { void bar(int a) { unsigned char *c = new unsigned char[a*sizeof(foo)]; } };
gets an ICE: foo.c: In member function 'void junk<foo>::bar(int)': foo.c:4: internal compiler error: tree check: did not expect class 'type', have 'type' (template_type_parm) in contains_placeholder_p, at tree.c:2139 However 4.0 and 4.1 dont. -- Summary: ICE on c++ template Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: anton at samba dot org GCC target triplet: powerpc64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27210