https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83992
--- Comment #1 from Ian Lance Taylor <ian at airs dot com> --- In the 147t.cddce2 dump (as dumped with -fdump-tree-all-lineno) I see this: <bb 4> [local count: 1063004407]: # j_8 = PHI <[foo.go:6:7] 0(3), [foo.go:6:31] j_5(6)> # DEBUG j => j_8 [foo.go:6:31] j_5 = j_8 + 1; [foo.go:6:31] # DEBUG j => j_5 # DEBUG j => j_5 [foo.go:6:17] if (j_5 != 2147483647) goto <bb 6>; [98.99%] else goto <bb 5>; [1.01%] In the subsequent 148t.ivcanon dump I see this: <bb 4> [local count: 1063004407]: # j_8 = PHI <[foo.go:6:7] 0(3), [foo.go:6:31] j_5(6)> # ivtmp_7 = PHI <2147483647(3), ivtmp_1(6)> # DEBUG j => j_8 [foo.go:6:31] j_5 = j_8 + 1; [foo.go:6:31] # DEBUG j => j_5 # DEBUG j => j_5 ivtmp_1 = ivtmp_7 - 1; [foo.go:6:17] if (ivtmp_1 != 0) goto <bb 6>; [98.99%] else goto <bb 5>; [1.01%] Note that the new insn `ivtmp_1 = ivtmp_7 - 1;` has no location info. I think that is the point that leads to the incorrect placement of the NOTE_INSN_BLOCK_BEG note.