Remove outermost loop parameter.
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / tree-ssa / sra-5.c
blob869d2f55f95aa0892fddeffad58f3496e82e90b1
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
4 /* Tests for SRA of unions. */
7 typedef union testunion
9 double d;
10 char f1;
11 } testunion;
13 void
14 copyunion1 (testunion param)
16 testunion local;
17 param.f1 = 0;
18 local = param;
19 if (local.f1 != 0)
20 link_error ();
23 void
24 copyunion11 (testunion *param)
26 testunion local;
27 param->f1 = 0;
28 local = *param;
29 if (local.f1 != 0)
30 link_error ();
33 void
34 copyunion111 (testunion param)
36 testunion *local = &param;
37 param.f1 = 0;
38 if (local->f1 != 0)
39 link_error ();
42 testunion globuf;
43 void
44 copyunion1111 (void)
46 testunion local;
47 globuf.f1 = 0;
48 local = globuf;
49 if (local.f1 != 0)
50 link_error ();
53 void
54 copyunion11111 (void)
56 testunion *local = &globuf;
57 globuf.f1 = 0;
58 if (local->f1 != 0)
59 link_error ();
62 void
63 copyunion111111 (testunion param)
65 static testunion local;
66 param.f1 = 0;
67 local = param;
68 if (local.f1 != 0)
69 link_error ();
72 /* There should be no reference to link_error. */
73 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } */
74 /* { dg-final { cleanup-tree-dump "optimized" } } */