Debian Codegraph @

gcc/testsuite/gcc.dg/pr60013.c

raw
1 /* PR ipa/60013 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4
5 typedef long int jmp_buf[64];
6 extern int _setjmp (jmp_buf) __attribute__ ((__nothrow__));
7 struct S { int a, b, c; };
8 extern struct S *baz (struct S *);
9 static jmp_buf j;
10
11 static inline int
12 bar (int b, int d)
13 {
14 return (b & d) < 0;
15 }
16
17 struct S *
18 foo (int a, struct S *b, struct S *c, struct S *d)
19 {
20 if (b->a == 0)
21 {
22 switch (a)
23 {
24 case 8:
25 return baz (b);
26 case 7:
27 bar (b->c, c->b);
28 return 0;
29 case 6:
30 case 5:
31 case 4:
32 return baz (c);
33 case 3:
34 case 2:
35 return baz (d);
36 }
37 return 0;
38 }
39 if (b->a == 1)
40 {
41 if (baz (c))
42 return c;
43 else if (_setjmp (j))
44 baz (b);
45 }
46 return 0;
47 }