1 /* PR target/39678 */ 2 /* { dg-do run } */ 3 /* { dg-options "-Wno-psabi" } */ 4 struct Y {}; 5 struct X { 6 struct Y y; 7 __complex__ float val; 8 }; 9 10 struct X __attribute__((noinline)) foo(float * p)11foo (float *p) 12 { 13 struct X x; 14 __real x.val = p[0]; 15 __imag x.val = p[1]; 16 return x; 17 } 18 extern "C" void abort (void); 19 float a[2] = { 3., -2. }; main()20int main() 21 { 22 struct X x = foo(a); 23 if (__real x.val != 3. || __imag x.val != -2.) 24 abort (); 25 return 0; 26 } 27