LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-sra-1.c
blob4db904b419e15e977a1a9fce65356956bc10ccd5
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__((noinline))
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-times "About to replace expr" 2 "eipa_sra" } } */