https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80617
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- So we end up with void disassemble_me(A&, A&) (struct A & a, struct A & b) { void * __old_val; void * __old_val; void * _7; void * _8; <bb 2> [100.00%]: __old_val_5 = MEM[(void * &)a_2(D)]; MEM[(void * &)a_2(D)] = 0B; __old_val_6 = MEM[(void * &)b_3(D)]; MEM[(void * &)b_3(D)] = 0B; _7 = MEM[(void * &)a_2(D)]; MEM[(void * &)a_2(D)] = __old_val_6; if (_7 != 0B) goto <bb 3>; [53.47%] else goto <bb 4>; [46.53%] <bb 3> [53.47%]: free (_7); ... which shows this issue. I believe there's a duplicate PR for this somewhere... (I even remember writing a patch for this).