this program aborts if compiled with any options: ---------------------------------------------------------------------------------------- extern void abort (void);
int foo (int k) { unsigned char j = 0; (k ? 0 : j++) == -1; return j; } int main () { if (!foo (0)) abort (); return 0; } ---------------------------------------------------------------------------------------- -- Summary: [4.0 Regression] wrong code with operator "?" Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: wrong-code Severity: critical Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: belyshev at lubercy dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18921