1 // PR target/59163 2 // { dg-do run } 3 4 struct A { float a[4]; }; 5 struct B { int b; A a; }; 6 7 __attribute__((noinline, noclone)) void bar(A & a)8bar (A &a) 9 { 10 if (a.a[0] != 36.0f || a.a[1] != 42.0f || a.a[2] != 48.0f || a.a[3] != 54.0f) 11 __builtin_abort (); 12 } 13 14 __attribute__((noinline, noclone)) void foo(A & a)15foo (A &a) 16 { 17 int i; 18 A c = a; 19 for (i = 0; i < 4; i++) 20 c.a[i] *= 6.0f; 21 a = c; 22 bar (a); 23 } 24 25 int main()26main () 27 { 28 B b = { 5, { 6, 7, 8, 9 } }; 29 foo (b.a); 30 } 31