`g++ bug.cc' causes this error: bug.cc: In function 'void f()': bug.cc:5:20: error: '__cxa_begin_catch' cannot be used as a function bug.cc:5:20: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at tree-ssa.c:1221
And bug.cc is...
Created attachment 19015 [details] The bug.cc file Sorry, forgot it. :)
Funny, and I agree the compiler should behave more gracefully, but this code is invalid per 17.4.3.1.2: names containing a double underscore are reserved.
Jason, as far as I know, we never compiled this, the ICE is new. If we only want to avoid the ICE, I'm attaching a patchlet to except.c which works fine, otherwise, please let me know...
Created attachment 19105 [details] Draft patch
The ICE happens since GCC 4.2.0.
The patch is OK.
Subject: Bug 42038 Author: paolo Date: Wed Jan 20 23:12:25 2010 New Revision: 156094 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156094 Log: /cp 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com> PR c++/42038 * except.c (expand_start_catch_block): Deal correctly with do_begin_catch returning error_mark_node. /testsuite 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com> PR c++/42038 * g++.dg/parse/crash55.C: New. Added: trunk/gcc/testsuite/g++.dg/parse/crash55.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/except.c trunk/gcc/testsuite/ChangeLog
Fixed for 4.5.0. Being just an ice-on-invalid will not be fixed in 4_3 / 4_4.