modernc.org/cc@v1.0.1/testdata/gcc-6.3.0/gcc/testsuite/gcc.c-torture/execute/980605-1.c (about) 1 #include <stdio.h> 2 3 #ifndef STACK_SIZE 4 #define STACK_SIZE 200000 5 #endif 6 7 __inline__ static int 8 dummy (x) 9 { 10 int y; 11 y = (long) (x * 4711.3); 12 return y; 13 } 14 15 int getval (void); 16 17 int 18 f2 (double x) 19 { 20 unsigned short s; 21 int a, b, c, d, e, f, g, h, i, j; 22 23 a = getval (); 24 b = getval (); 25 c = getval (); 26 d = getval (); 27 e = getval (); 28 f = getval (); 29 g = getval (); 30 h = getval (); 31 i = getval (); 32 j = getval (); 33 34 35 s = x; 36 37 return a + b + c + d + e + f + g + h + i + j + s; 38 } 39 40 int x = 1; 41 42 int 43 getval (void) 44 { 45 return x++; 46 } 47 48 char buf[10]; 49 50 void 51 f () 52 { 53 char ar[STACK_SIZE/2]; 54 int a, b, c, d, e, f, g, h, i, j, k; 55 56 a = getval (); 57 b = getval (); 58 c = getval (); 59 d = getval (); 60 e = getval (); 61 f = getval (); 62 g = getval (); 63 h = getval (); 64 i = getval (); 65 j = getval (); 66 67 k = f2 (17.0); 68 69 sprintf (buf, "%d\n", a + b + c + d + e + f + g + h + i + j + k); 70 if (a + b + c + d + e + f + g + h + i + j + k != 227) 71 abort (); 72 } 73 74 main () 75 { 76 f (); 77 exit (0); 78 }