modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/pr22061-1.c (about)

     1  /* { dg-require-effective-target alloca } */
     2  int N = 1;
     3  void foo() {} /* Necessary to trigger the original ICE.  */
     4  void bar (char a[2][N]) { a[1][0] = N; }
     5  int
     6  main (void)
     7  {
     8    void *x;
     9  
    10    N = 4;
    11    x = alloca (2 * N);
    12    memset (x, 0, 2 * N);
    13    bar (x);
    14    if (N[(char *) x] != N)
    15      abort ();
    16    exit (0);
    17  }