Debian Codegraph @

gcc/testsuite/gcc.dg/pr117239.c

raw
1 /* PR rtl-optimization/117239 */
2 /* { dg-do run } */
3 /* { dg-options "-fno-inline -O2" } */
4 /* { dg-additional-options "-fschedule-insns" { target i?86-*-* x86_64-*-* } } */
5
6 int a, b, c = 1, d;
7
8 int
9 foo (void)
10 {
11 return a;
12 }
13
14 struct A {
15 int e, f, g, h;
16 short i;
17 int j;
18 };
19
20 void
21 bar (int x, struct A y)
22 {
23 if (y.j == 1)
24 c = 0;
25 }
26
27 int
28 baz (struct A x)
29 {
30 return b;
31 }
32
33 int
34 main ()
35 {
36 struct A k = { 0, 0, 0, 0, 0, 1 };
37 d = baz (k);
38 bar (foo (), k);
39 if (c != 0)
40 __builtin_abort ();
41 return 0;
42 }