https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93946
--- Comment #13 from sandra at gcc dot gnu.org --- Well, no. The problem is that the scheduler is moving ldw r2, 0(r4) ahead of stw zero, 0(r5) which is incorrect because the pointers in r4 and r5 are aliases. So at the point of call to true_dependence, I see: (gdb) frame 1 #1 0x0000000001d1a108 in sched_analyze_2 (deps=0x7fffffffdd50, x=0x7ffff742cac8, insn=0x7ffff7315600) at /scratch/sandra/nios2-elf-fsf/src/gcc-mainline/gcc/sched-deps.c:2663 2663 if (true_dependence (pending_mem->element (), VOIDmode, t) (gdb) print debug_rtx(insn) (insn 17 10 18 2 (set (reg/i:SI 2 r2) (mem/j:SI (reg/v/f:SI 4 r4 [orig:47 bv ] [47]) [1 bv_3(D)->b.u.f+0 S4 A32])) "/scratch/sandra/nios2-elf-fsf/src/gcc-mainline/gcc/testsuite/gcc.dg/torture/pr93946-1.c":18:1 5 {movsi_internal} (expr_list:REG_DEAD (reg/v/f:SI 4 r4 [orig:47 bv ] [47]) (nil))) $3 = void (gdb) print debug_rtx(pending->insn()) (insn 9 8 10 2 (set (mem/j:SI (reg/v/f:SI 5 r5 [orig:48 ptr ] [48]) [1 MEM[(struct aa *)ptr_1(D)].a.u.i+0 S4 A32]) (const_int 0 [0])) "/scratch/sandra/nios2-elf-fsf/src/gcc-mainline/gcc/testsuite/gcc.dg/torture/pr93946-1.c":15:12 5 {movsi_internal} (nil)) $4 = void