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