Take the following code (which comes from gcc.c-torture/compile/950816-3.c): f () { int i; short x, z; for (i = 0; i <= 1; i++) x = i; return x + z; }
I think this is a scev bug but I have not looked into it yet. Use the first and 4th patch in PR 22368 to see the problem. The 4th patch will show that it was in fact SCCP which caused this and not empty and/or merge sequential BBs in cfgcleanup. -- Summary: SCCP causes type mismatch Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org OtherBugsDependingO 22368 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23166