http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60043
--- Comment #5 from Andrey Belevantsev <abel at gcc dot gnu.org> --- (In reply to Richard Biener from comment #4) > Hmm, oops. The testcase has a true dependence ... ;) Still, isn't the > code in sched_analyze_2 wrong? Or are pending_mems all before 't'? Yes (to second question :). The analysis code roughly works like this (sched_analyze is the entry point): - process insns one by one in a bb/ebb doing two things in parallel: o mark reads/writes to registers, writes/reads to mems of this insn in various fields of the deps context; and o find dependencies between this insn reads/writes of registers/memory and previously noted reads/writes of the same register or memory from the deps context. So the pending_mem read/write will always happen before the currently processing insn mem read/write.