1/* { dg-do run } */
2/* { dg-options "-O3" } */
3/* { dg-add-options bind_pic_locally } */
4
5struct S
6{
7  int a, b, c;
8};
9
10volatile int g;
11
12static void __attribute__ ((noinline, noclone))
13bar (struct S **p)
14{
15  g = 5;
16};
17
18static void __attribute__ ((noinline))
19foo (struct S *p)
20{
21  int i = p->a;
22  if (i != 1)
23    __builtin_abort ();
24  bar (&p);
25}
26
27int
28main (int argc, char *argv[])
29{
30  struct S s;
31  s.a = 1;
32  s.b = 64;
33  s.c = 32;
34  foo (&s);
35
36  return 0;
37}
38
39