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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So we have

  <bb 2> :
  saved_stack.2_7 = __builtin_stack_save ();
  _1 = (long int) x_6(D);
  _2 = _1 + -1;
  _13 = (sizetype) _2;
  _4 = (sizetype) x_6(D);
  _5 = (bitsizetype) _4;
  _14 = _5 * 8;
  arr.1_19 = __builtin_alloca_with_align (_4, 8);
  (*arr.1_19)[0] = 0;
  _12 = g ();
  if (_12 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  abort ();

  <bb 4> :
  __builtin_stack_restore (saved_stack.2_7);
  return;

I guess the "usual" way of dealing with this would be to have
CLOBBERs for all VLAs before the __builtin_stack_restore.

Reply via email to