PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-sra-11.c
blobe91423a62fbb6b9603659c4c4aa4ac68874c78aa
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fipa-sra -fdump-tree-eipa_sra-details" } */
4 struct bovid
6 float red;
7 int green;
8 void *blue;
9 };
11 extern int printf (const char *, ...);
12 extern void abort (void);
14 static int
15 __attribute__((noipa))
16 ox (struct bovid cow)
18 if (cow.green != 6)
19 abort ();
21 printf ("green: %f\nblue: %p\nblue again: %p\n", cow.green,
22 cow.blue, cow.blue);
23 return 0;
26 int
27 main (int argc, char *argv[])
29 struct bovid cow;
31 cow.red = 7.4;
32 cow.green = 6;
33 cow.blue = &cow;
35 ox (cow);
36 return 0;
39 /* { dg-final { scan-tree-dump-not "About to replace expr" "eipa_sra" } } */