Debian Codegraph @

gcc/testsuite/gcc.dg/ipa/pr56988.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-O3" } */
3 /* { dg-add-options bind_pic_locally } */
4
5 struct S
6 {
7 int a, b, c;
8 };
9
10 volatile int g;
11
12 static void __attribute__ ((noinline, noclone))
13 bar (struct S **p)
14 {
15 g = 5;
16 };
17
18 static void __attribute__ ((noinline))
19 foo (struct S *p)
20 {
21 int i = p->a;
22 if (i != 1)
23 __builtin_abort ();
24 bar (&p);
25 }
26
27 int
28 main (int argc, char *argv[])
29 {
30 struct S s;
31 s.a = 1;
32 s.b = 64;
33 s.c = 32;
34 foo (&s);
35
36 return 0;
37 }
38