PR tree-optimization/81384 - built-in form of strnlen missing
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 980605-1.c
blob7179ba6388109ecd29c97f3f2dc1c310529a680e
1 /* { dg-add-options stack_size } */
3 #include <stdio.h>
5 #ifndef STACK_SIZE
6 #define STACK_SIZE 200000
7 #endif
9 __inline__ static int
10 dummy (x)
12 int y;
13 y = (long) (x * 4711.3);
14 return y;
17 int getval (void);
19 int
20 f2 (double x)
22 unsigned short s;
23 int a, b, c, d, e, f, g, h, i, j;
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 ();
37 s = x;
39 return a + b + c + d + e + f + g + h + i + j + s;
42 int x = 1;
44 int
45 getval (void)
47 return x++;
50 char buf[10];
52 void
53 f ()
55 char ar[STACK_SIZE/2];
56 int a, b, c, d, e, f, g, h, i, j, k;
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 ();
69 k = f2 (17.0);
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 ();
76 main ()
78 f ();
79 exit (0);