kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

builtin_32_alloca_large_frame.c (356B)


      1 /* Large fixed frame plus dynamic alloca. This catches native prologue/frame
      2  * placeholder sizing bugs across aa64, x64, rv64, and rv32. */
      3 int test_main(void) {
      4   volatile char fixed[5000];
      5   volatile int n = 32;
      6   char* p = (char*)__builtin_alloca((unsigned)n);
      7   fixed[0] = 17;
      8   fixed[4999] = 19;
      9   p[0] = 6;
     10   return fixed[0] + fixed[4999] + p[0];
     11 }