Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/920501-7.c

raw
1 /* { dg-require-effective-target label_values } */
2 /* { dg-require-effective-target trampolines } */
3 /* { dg-add-options stack_size } */
4 /* { dg-additional-options "-std=gnu89" } */
5
6 #ifdef STACK_SIZE
7 #define DEPTH ((STACK_SIZE) / 512 + 1)
8 #else
9 #define DEPTH 1000
10 #endif
11
12 x(a)
13 {
14 __label__ xlab;
15 void y(a)
16 {
17 if (a==0)
18 goto xlab;
19 y (a-1);
20 }
21 y (a);
22 xlab:;
23 return a;
24 }
25
26 main ()
27 {
28 if (x (DEPTH) != DEPTH)
29 abort ();
30
31 exit (0);
32 }