modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/compile/memtst.c (about)

     1  /* { dg-add-options stack_size } */
     2  
     3  #ifdef STACK_SIZE
     4  #define SIZE STACK_SIZE / 8
     5  #else
     6  #define SIZE 65536
     7  #endif
     8  
     9  memtst (int *p, int a)
    10  {
    11    do
    12      {
    13        if (p[a] == 1)
    14  	break;
    15      }
    16    while (--a);
    17  }
    18  
    19  main ()
    20  {
    21    int a[SIZE];
    22    int i;
    23    bzero (a, SIZE * 4);
    24    for (i = 0;  i < 100;  i++)
    25      {
    26        memtst (a, SIZE);
    27      }
    28  }