Update gcc-auto-profile / gen_autofdo_event.py
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-fre-8.c
blob1a537d8beeaf8b8b2ce920a4792bad91ab11e540
1 /* { dg-do compile } */
2 /* { dg-options "-O -fno-tree-sra -fdump-tree-fre1-details" } */
3 #if (__SIZEOF_INT__ == __SIZEOF_FLOAT__)
4 typedef int intflt;
5 #elif (__SIZEOF_LONG__ == __SIZEOF_FLOAT__)
6 typedef long intflt;
7 #else
8 #error Add target support here for type that will union float size
9 #endif
10 union U {
11 intflt i;
12 float f;
14 intflt foo(int i, int b)
16 union U u;
17 if (b)
19 i = i << 2;
20 u.i = i;
21 return u.f;
23 else
25 i = i << 2;
26 u.i = i;
27 return u.f;
31 /* { dg-final { scan-tree-dump-times "Replaced u.f with" 2 "fre1" } } */
32 /* { dg-final { scan-tree-dump-times "Inserted" 2 "fre1" } } */