1 /* { dg-do run } */ 2 /* { dg-options "-O1" } */ 3 4 static int __attribute__((noipa)) get_5(void)5get_5 (void) 6 { 7 return 5; 8 } 9 10 static int __attribute__((noipa)) verify_5(int v)11verify_5 (int v) 12 { 13 if (v != 5) 14 __builtin_abort (); 15 } 16 17 struct T 18 { 19 int w; 20 int a[4]; 21 }; 22 23 struct S 24 { 25 int v; 26 int x; 27 struct T t[2]; 28 char alotofstuff[128]; 29 }; 30 31 volatile int vol; 32 33 void __attribute__((noipa)) consume_t(struct T t)34consume_t (struct T t) 35 { 36 vol = t.a[0]; 37 } 38 39 int __attribute__((noipa)) foo(int l1,int l2)40foo (int l1, int l2) 41 { 42 struct S s1, s2, s3; 43 int i, j; 44 45 s1.v = get_5 (); 46 for (i = 0; i < l1; i++) 47 { 48 for (j = 0; j < l2; j++) 49 s1.t[i].a[j] = get_5 (); 50 consume_t(s1.t[i]); 51 } 52 53 s2 = s1; 54 55 s3 = s2; 56 for (i = 0; i < l1; i++) 57 for (j = 0; j < l2; j++) 58 verify_5 (s3.t[i].a[j]); 59 } 60 61 int main(int argc,char * argv[])62main (int argc, char *argv[]) 63 { 64 foo (2, 4); 65 return 0; 66 } 67