http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60902
--- Comment #24 from Jeffrey A. Law <law at redhat dot com> --- So the issue here is we have an ASM which feeds an eq/neq condition found inside a loop. The eq/neq condition creates an equivalency that is (mis) used when we thread through the loop backedge. The code which records temporary equivalences for jump threading ignores GIMPLE_ASMs, so as we reprocess the block, the old equivalence isn't replaced with anything new. ie, the old equivalence doesn't get invalidated. As a result we re-use the implied value from the conditional in a previous iteration of the loop to incorrectly simplify a test and all hell breaks loose. In the past we were so conservative when traversing loop backedges that it was safe to totally ignore GIMPLE_ASMs in this code. That's no longer the safe thing to do.