https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125526

--- Comment #2 from Agri <agri at akamo dot info> ---
GCC 16.1 at -O0
The bug is still present but manifests differently.

  ; asm's je .L4 taken → abort_lbl → lands here:
  .L4:
  .L10:
      leave
      ret

  The C++ code you wrote after abort_lbl: — *out = (saved >= 0) ? p : nullptr —
was silently dropped. GCC placed .L4 (abort_lbl) after the success-path
assignment block instead of before it, so the abort path
  skips the *out = ... entirely.

Return values are correct. Stack is safe (no crash). But *out is left
uninitialized garbage on the abort path — which is exactly what the C++
abort_lbl: block was supposed to set.

Reply via email to