1 /* { dg-do run } */ 2 /* { dg-options "-fno-tree-sra" } */ 3 4 struct S {int x, y, makemelarge[5];}; f(S & s)5S __attribute__((noinline)) f (S &s) { 6 S r; 7 r.x = s.y; 8 r.y = s.x; 9 return r; 10 } glob(int a,int b)11int __attribute__((noinline)) glob (int a, int b) 12 { 13 S local = { a, b }; 14 local = f (local); 15 return local.y; 16 } 17 extern "C" void abort (void); main(void)18int main (void) 19 { 20 if (glob (1, 3) != 1) 21 abort (); 22 return 0; 23 } 24 25