$ cat ehtest.cc //#include <stdio.h> int main() { try { throw 1; } catch (...) { printf(" in catch\n"); return 1; } printf(" back in main\n"); return 10; } $ llvmg++ -O2 ehtest.cc -c ehtest.cc: In function `int main()': ehtest.cc:8: error: `printf' undeclared (first use this function) ehtest.cc:8: error: (Each undeclared identifier is reported only once for each function it appears in.) <var_decl 0x401b84d0 _ZTIi type <record_type 0x401b4150 __fundamental_type_info_pseudo readonly type_5 DI size <integer_cst 0x40021618 constant 64> unit size <integer_cst 0x4002199c constant 8> align 32 symtab 0 alias set -1 fields <field_decl 0x401b3ee0 type <record_type 0x401b3c40 __type_info_pseudo> DI file <internal> line 0 size <integer_cst 0x40021618 64> unit size <integer_cst 0x4002199c 8> align 32 offset_align 32 offset <integer_cst 0x40021a64 constant 0> bit offset <integer_cst 0x40021b04 constant 0> context <record_type 0x401b3f50 __fundamental_type_info_pseudo> arguments <integer_cst 0x40021a64 0>> n_parents 0 use_template=0 interface-unknown> readonly public static common external DI file ehtest.cc line 5 size <integer_cst 0x40021618 64> unit size <integer_cst 0x4002199c 8> align 32 chain <function_decl 0x401b8310 __llvm_cxxeh_allocate_exception>> ehtest.cc:5: internal compiler error: in llvm_expand_lvalue_expr, at llvm-expand.c:4258 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://llvm.cs.uiuc.edu> for instructions.
This is now fixed.