Debian Codegraph @

gcc/testsuite/gcc.dg/ipa/ipa-sra-29.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-sra-details" } */
3
4 struct S
5 {
6 float f;
7 int i;
8 void *p;
9 };
10
11 extern struct S *gp;
12 int baz (float);
13
14 static int
15 __attribute__((noinline))
16 bar (struct S *p)
17 {
18 if (p->i != 6)
19 __builtin_abort ();
20
21 return baz(p->f);
22 }
23
24 int
25 foo (void)
26 {
27 struct S s;
28
29 gp = &s;
30 s.f = 7.4;
31 s.i = 6;
32 s.p = &s;
33
34 bar (&s);
35 return 0;
36 }
37
38 /* { dg-final { scan-ipa-dump-not "Variable constructed just to be passed to calls" "sra" } } */