PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-icf-15.c
blob2ed66f7706b14074b789004059d8db1baeecd4eb
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-icf" } */
4 #include <stdio.h>
6 __attribute__ ((noinline))
7 int bar(int a)
9 void *l = &&error;
11 if(a == 4)
12 goto *l;
14 return 150;
16 error:
17 return a;
18 failure:
19 return a + 2;
22 __attribute__ ((noinline))
23 int foo(int a)
25 void *l = &&error;
27 if(a == 4)
28 goto *l;
30 return 150;
32 error:
33 return a;
34 failure:
35 return a + 2;
38 int main(int argc, char **argv)
40 printf("value: %d\n", foo(argc));
42 return 0;
45 /* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */