PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / pr56988.c
blobab20159b8ec5a3e9b0a2c15d800da41a065a6cc2
1 /* { dg-do run } */
2 /* { dg-options "-O3" } */
3 /* { dg-add-options bind_pic_locally } */
5 struct S
7 int a, b, c;
8 };
10 volatile int g;
12 static void __attribute__ ((noinline, noclone))
13 bar (struct S **p)
15 g = 5;
18 static void __attribute__ ((noinline))
19 foo (struct S *p)
21 int i = p->a;
22 if (i != 1)
23 __builtin_abort ();
24 bar (&p);
27 int
28 main (int argc, char *argv[])
30 struct S s;
31 s.a = 1;
32 s.b = 64;
33 s.c = 32;
34 foo (&s);
36 return 0;