https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66422
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2015-06-08 CC| |hubicka at gcc dot gnu.org Component|c |tree-optimization Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Ok, so we peeled the loop like run_foo () { ... <bb 10>: _33 = myfoo_28->buf[3]; if (_33 != 1) goto <bb 13>; else goto <bb 11>; <bb 11>: _34 = (int) _27; if (_34 > 4) goto <bb 12>; else goto <bb 13>; <bb 12>: __builtin_unreachable (); _35 = myfoo_28->buf[4]; <bb 13>: # _36 = PHI <0(2), 1(3), 0(4), 1(5), 0(6), 1(7), 0(8), 1(9), 0(10), 1(11), 0(12)> if (_36 != 0) goto <bb 15>; else goto <bb 14>; <bb 14>: i_37 = 1; <bb 15>: # _2 = PHI <0(13), -1(14)> return _2; and the unreachable () remains in the CFG. Honza - it seems that remove_exits_and_undefined_stmts inserts these unreachable calls but fails to split the BBs. I have a patch.