The following test program works with gcc-2.95.3 and gcc-3.4.1, but aborts with this error on gcc-4.0.0:
z.ii: In function 'void bar()': z.ii:11: internal compiler error: in create_tmp_var, at gimplify.c:368 struct Foo { ~Foo() {} int i; operator bool() { return !i; } }; void bar() { Foo foo = ({ Foo bletch; bletch.i = 0; bletch; }); } This popped up in an early run of gcc-4.0.0 on real code. -- Summary: [4.0 Regression] ICE with statement-as-expression Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dank at kegel dot com CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i686-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21440