Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-sra-details" } */
3
4 struct S
5 {
6 short a, b, c;
7 };
8
9 extern int gc;
10 extern int *arr;
11
12 static void __attribute__((noinline))
13 foo (struct S *p)
14 {
15 for (int i = 0; i < gc; i++)
16 arr += p->b;
17 }
18
19 void
20 bar (short a, short b, short c)
21 {
22 struct S s;
23 s.a = a;
24 s.b = b;
25 s.c = c;
26 foo (&s);
27 return;
28 }
29
30 /* { dg-final { scan-ipa-dump "Will split parameter" "sra" } } */
31