https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79671
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- As there are two different comparisons, I've in the debugger tried to manually optimize just one of them and not the other one (return 0 in gdb), and it seems that it is the: &tmp == _286 comparison that matters (when optimized into false, testcase aborts), the other comparison doesn't matter. tmp is indeed an automatic variable and _286 is this parameter + some constant offset, so indeed fre3 is right to optimize that away.