http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48491
Summary: ICE in "delete" with template convertion operator Product: gcc Version: lto Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: fl...@flast.jp GCC becomes ICE with -flto option. ---- testcase.C ---- struct S { template < typename T > operator T *() { return 0; } }; int main() { S s; delete s; } --- GCC outputs following error. testcase.C: In function 'int main()': testcase.C:10:12: warning: possible problem detected in invocation of delete operator: [enabled by default] testcase.C:10:12: warning: invalid use of template type parameter 'T' [enabled by default] testcase.C:10:12: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined testcase.C: At top level: testcase.C:11:1: internal compiler error: tree code 'template_type_parm' is not supported in gimple streams Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. All of following versions become ICE. 4.5.2 4.5.3 20110217 4.6.0 4.6.1 20110310 4.7.0 20110405