http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42169
Vladimir Makarov <vmakarov at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at redhat dot com --- Comment #22 from Vladimir Makarov <vmakarov at redhat dot com> 2010-10-20 03:03:53 UTC --- Function store_can_be_removed_p was written in assumption that the store is on a loop exit. Apparently it is not true. In this case, it was actually a loop entry from 4 to 5 in loop tree: 0->1->2->3->4->5 | -->6->7 There should be some rare combinations of conditions (one is that pseudo is not changed in whole program) to achieve gcc_unreachable for the loop entry. Therefore it is hard to reproduce. There is a very simple solution which is to return false (preventing this optimization) instead of gcc_unreachable (that is a loop entry case). I'll send a patch soon.