1 /* PR tree-optimization/78558 */ 2 3 #include "tree-vect.h" 4 5 struct S 6 { 7 char p[48]; 8 unsigned long long q, r, s; 9 } s[50]; 10 11 struct D 12 { 13 unsigned long long q, r; 14 } d[50]; 15 16 void foo(void)17foo (void) 18 { 19 unsigned long i; 20 for (i = 0; i < 50; ++i) 21 { 22 d[i].q = s[i].q; 23 d[i].r = s[i].r; 24 } 25 } 26 27 int main()28main () 29 { 30 check_vect (); 31 unsigned long i; 32 for (i = 0; i < 50; ++i) 33 { 34 s[i].q = i; 35 s[i].r = 50 * i; 36 } 37 asm volatile ("" : : "g" (s), "g" (d) : "memory"); 38 foo (); 39 asm volatile ("" : : "g" (s), "g" (d) : "memory"); 40 for (i = 0; i < 50; ++i) 41 if (d[i].q != i || d[i].r != 50 * i) 42 abort (); 43 return 0; 44 } 45