* tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-fre-7.c
blob2b2353172cfc23e196a5cc43d33914f5d3d3a368
1 /* { dg-do compile } */
2 /* { dg-options "-O -fno-tree-sra -fdump-tree-fre1-details -fdump-tree-optimized" } */
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
11 struct X {
12 int i;
13 union {
14 intflt j;
15 intflt k;
16 float f;
17 } u;
20 intflt foo(intflt j)
22 struct X a;
24 a.u.j = j;
25 a.u.f = a.u.f;
26 a.u.f = a.u.f;
27 a.u.j = a.u.j;
28 a.u.f = a.u.f;
29 return a.u.k;
32 /* { dg-final { scan-tree-dump-times "Inserted" 1 "fre1" } } */
33 /* { dg-final { scan-tree-dump-times "Replaced a.u.f with" 3 "fre1" } } */
34 /* { dg-final { scan-tree-dump-times "Replaced a.u.k with j" 1 "fre1" } } */
35 /* { dg-final { scan-tree-dump "= VIEW_CONVERT_EXPR<float>\\\(j_" "fre1" } } */
36 /* { dg-final { scan-tree-dump "return j" "optimized" } } */