modernc.org/cc@v1.0.1/testdata/gcc-6.3.0/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.c (about)

     1  #include <limits.h>
     2  
     3  #if MASK & 1
     4  #define t11(x) x x x x x x x x x x x
     5  #define t16(x) x x x x x x x x x x x x x x x x
     6  #if INT_MAX < 2147483647
     7  #define M (sizeof (t11(t11(t16(t16(" "))))) - 1)
     8  #else
     9  #define M (sizeof (t16(t16(t16(t16(t16(" ")))))) - 1)
    10  #endif
    11  #endif
    12  #if MASK & 2
    13  #if INT_MAX < 2147483647
    14  #define M 30976
    15  #else
    16  #define M 1048576
    17  #endif
    18  #endif
    19  
    20  typedef struct s {
    21    int c;
    22    void *vp;
    23    struct s *s;
    24  }s;
    25  
    26  typedef int (*fpt) (const char *, void *, int *);
    27  
    28  int M_var = M;
    29  
    30  extern void exit (int);
    31  
    32  int
    33  f (int start, int end, int *a, int *b, int c, s *sp)
    34  {
    35    int count = 0;
    36    int i;
    37  
    38    for (i = start; i <= end; i++)
    39      {
    40        a[i] = b[i] + c;
    41        count ++;
    42      }
    43    (*(fpt)sp->s->vp) ("Hello World!\n", &exit, &M_var);
    44    return count;
    45  }
    46  
    47  int
    48  g (int i)
    49  {
    50    switch (i)
    51      {
    52      case 1: return 42;
    53      case 2: return 60;
    54      case 3: return 7;
    55      case 4: return 3;
    56      case 5: return M;
    57      default: return 0;
    58      }
    59  }