1 /* { dg-do run } */ 2 /* { dg-options "-O2 -fipa-sra -fdump-tree-eipa_sra-details" } */ 3 4 struct bovid 5 { 6 float red; 7 int green; 8 void *blue; 9 }; 10 11 extern int printf (const char *, ...); 12 extern void abort (void); 13 14 static int 15 __attribute__((noinline)) ox(struct bovid cow)16ox (struct bovid cow) 17 { 18 if (cow.green != 6) 19 abort (); 20 21 printf ("green: %f\nblue: %p\nblue again: %p\n", cow.green, 22 cow.blue, cow.blue); 23 return 0; 24 } 25 26 int main(int argc,char * argv[])27main (int argc, char *argv[]) 28 { 29 struct bovid cow; 30 31 cow.red = 7.4; 32 cow.green = 6; 33 cow.blue = &cow; 34 35 ox (cow); 36 return 0; 37 } 38 39 /* { dg-final { scan-tree-dump-times "About to replace expr" 2 "eipa_sra" } } */ 40