blob: a83a6f374d77cbcc0a05ea8004712d76b3d320e7 (
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
|
/* { dg-do run } */
/* { dg-options "-fno-tree-sra" } */
struct S {int x, y, makemelarge[5];};
S __attribute__((noinline)) f (S &s) {
S r;
r.x = s.y;
r.y = s.x;
return r;
}
int __attribute__((noinline)) glob (int a, int b)
{
S local = { a, b };
local = f (local);
return local.y;
}
extern "C" void abort (void);
int main (void)
{
if (glob (1, 3) != 1)
abort ();
return 0;
}
|