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

     1  /* { dg-add-options stack_size } */
     2  
     3  struct parsefile
     4  {
     5    long fd;
     6    char *buf;
     7  };
     8  struct parsefile basepf;
     9  struct parsefile *parsefile = &basepf;
    10  #ifdef STACK_SIZE
    11  int filler[STACK_SIZE / (2*sizeof(int))];
    12  #else
    13  int filler[0x3000];
    14  #endif
    15  int el;
    16  
    17  char *
    18  g1 (a, b)
    19       int a;
    20       int *b;
    21  {
    22  }
    23  
    24  g2 (a)
    25       long a;
    26  {
    27    if (a != 0xdeadbeefL)
    28      abort ();
    29    exit (0);
    30  }
    31  
    32  f ()
    33  {
    34    register char *p, *q;
    35    register int i;
    36    register int something;
    37  
    38    if (parsefile->fd == 0L && el)
    39      {
    40        const char *rl_cp;
    41        int len;
    42        rl_cp = g1 (el, &len);
    43        strcpy (p, rl_cp);
    44      }
    45    else
    46      {
    47      alabel:
    48        i = g2 (parsefile->fd);
    49      }
    50  }
    51  
    52  main ()
    53  {
    54    el = 0;
    55    parsefile->fd = 0xdeadbeefL;
    56    f ();
    57  }