https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82813
--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > The warning will go away once pr80545 is fixed but I wonder if a better > (independent) solution in this case is to detect that the code is, in fact, > unreachable, and avoid emitting it to begin with. Yes, it's a missed optimization at the GIMPLE level. > Alternatively, if it is too hard to determine that it's unreachable, it should > be possible to detect that the memcpy call is invalid earlier and replace it > with either __builtin_unreachable or __builtin_trap. Possibly, 121t.phicprop1 has: S117b.276_245 = .builtin_alloca_with_align (0, 8); # DEBUG S117b.276 => S117b.276_245 _46 = (sizetype) j_231; _48 = &*sw.246_6[1 ...]{lb: 1 sz: 1}; _49 = &*S117b.276_245[1 ...]{lb: 1 sz: 1}; .builtin_memcpy (_49, _48, _46);