The follwoing code snippet triggers an ICE since GCC 4.0.0: ===================================== void foo(int i) { (i ? 1 : 2) = ({ int X; }); } =====================================
bug.cc: In function 'void foo(int)': bug.cc:3: internal compiler error: in build_target_expr_with_type, at cp/tree.c:382 Please submit a full bug report, [etc.] The problem is similar to PR 30158, but alas not fixed with Andrew's patch. It's even worse because it's not an error-recovery bug. -- Summary: [4.1/4.2/4.3 regression] ICE with invalid statement expression Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, 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=30847