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