1 /* { dg-do run } */ 2 /* { dg-options "-fno-common" { target hppa*-*-hpux* } } */ 3 4 typedef union 5 { 6 double v[2]; 7 double s __attribute__ ((vector_size (16))); 8 } data; 9 10 data reg; 11 12 void __attribute__ ((noinline)) set_lower(double b)13set_lower (double b) 14 { 15 data stack_var; 16 double __attribute__ ((vector_size (16))) one = { 1.0, 1.0 }; 17 stack_var.s = reg.s; 18 stack_var.s += one; 19 stack_var.v[0] += b; 20 reg.s = stack_var.s; 21 } 22 23 int main(int argc,char ** argv)24main (int argc, char ** argv) 25 { 26 reg.v[0] = 1.0; 27 reg.v[1] = 1.0; 28 /* reg should contain { 1.0, 1.0 }. */ 29 set_lower (2.0); 30 /* reg should contain { 4.0, 2.0 }. */ 31 if ((int) reg.v[0] != 4 || (int) reg.v[1] != 2) 32 __builtin_abort (); 33 return 0; 34 } 35