mem_large_alloca_frame.c (519B)
1 /* Regression: aarch64 -O0 single-pass prologue reservation must cover a large 2 * fixed frame plus the alloca frame-base anchor setup. The 5000-byte local 3 * makes the deferred stack subtraction require the multi-insn form; alloca then 4 * adds the x28 save/setup in the same reserved prologue region. */ 5 int test_main(void) { 6 volatile char fixed[5000]; 7 volatile int n = 32; 8 char* p = (char*)__builtin_alloca((unsigned)n); 9 fixed[0] = 17; 10 fixed[4999] = 19; 11 p[0] = 6; 12 return fixed[0] + fixed[4999] + p[0]; 13 }