https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70013
--- Comment #5 from alalaw01 at gcc dot gnu.org --- Prior to SRA, we have d = *.LC0; d$0$f0_7 = MEM[(struct S0[2] *)&*.LC0].f0; e$f0_9 = MEM[(struct S0[2] *)&d + 3B].f0; _3 = (int) d$0$f0_7; c = _3; _5 = (int) e$f0_9; __builtin_printf ("%x\n", _5); sra_modify_assign for d=*.LC0 ends up in load_assign_lhs_subreplacements, where d has two children; the second is grp_to_be_replaced, but because we did not completely_scalarize LC0, there is an access to only the first half of *.LC0, and no corresponding RHS for the second half of d ('racc = find_access_in_subtree (sad->top_racc, offset, lacc->size' returns null). So we generate the bad d$3$f0_14 = MEM[(struct S0[2] *)&d + 3B].f0; that is, initializing the scalar replacement for the second half of d, with a value read from the first half of d.