libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-sra-32.c
blobf84442816b61b31f2491772246700203ce8678af
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-sra" } */
4 /* Test that parameters can be removed even when they are returned but the
5 return is unused. */
7 extern int use(int use);
10 static int __attribute__((noinline))
11 foo(int a, int b, int c)
13 use (c);
14 return a + b + c;
17 static int __attribute__((noinline))
18 bar (int a, int b, int c, int d)
20 return foo (a, b, c + d);
23 int
24 baz (int a, int b, int c, int d)
26 bar (a, b, c, d);
27 return a + d;
30 /* { dg-final { scan-ipa-dump-times "Will remove parameter" 4 "sra" } } */