The following code snippet triggers an ICE since GCC 4.0.0: ================================== extern "Java" struct A { int i; };
A foo(A); void bar() { foo(A()).i; } ================================== bug.cc: In function 'void bar()': bug.cc:10: error: no matching function for call to 'A::A(A)' bug.cc:2: note: candidates are: A::A() bug.cc:10: error: initializing argument 1 of 'A foo(A)' bug.cc:10: internal compiler error: in gimple_add_tmp_var, at gimplify.c:720 Please submit a full bug report, [etc.] With GCC 3.4.x we got the message: bug.cc: In function `void bar()': bug.cc:10: error: no matching function for call to `A::A(A)' bug.cc:10: error: initializing argument 1 of `A foo(A)' -- Summary: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in gimple_add_tmp_var Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, error-recovery, monitored Severity: normal Priority: P3 Component: c++ 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=30295