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

            Bug ID: 90922
           Summary: Bad prologue generated for call0 ABI functions
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jcmvbkbc at gcc dot gnu.org
  Target Milestone: ---

call0 ABI functions that require 129 to 1024 bytes of stack frame and don't
save any incoming registers on the stack don't get stack pointer adjustment
prologue. This results in stack frame corruption in the calling functions and
wrong stack pointer upon return from the function.

Reproducer:

#include <stdarg.h>
long x;
void
f3 (int i, ...)
{ 
  va_list aps[10];
  va_start (aps[4], i);
  x = va_arg (aps[4], long);
  va_end (aps[4]);
}

Reply via email to