Add qdf24xx base tuning support.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / sra-5.c
blob1e82e8fe4ef6e975674d2081ca5589f58ea09bd9
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
4 /* Tests for SRA of unions. */
6 void link_error (void);
8 typedef union testunion
10 double d;
11 char f1;
12 } testunion;
14 void
15 copyunion1 (testunion param)
17 testunion local;
18 param.f1 = 0;
19 local = param;
20 if (local.f1 != 0)
21 link_error ();
24 void
25 copyunion11 (testunion *param)
27 testunion local;
28 param->f1 = 0;
29 local = *param;
30 if (local.f1 != 0)
31 link_error ();
34 void
35 copyunion111 (testunion param)
37 testunion *local = &param;
38 param.f1 = 0;
39 if (local->f1 != 0)
40 link_error ();
43 testunion globuf;
44 void
45 copyunion1111 (void)
47 testunion local;
48 globuf.f1 = 0;
49 local = globuf;
50 if (local.f1 != 0)
51 link_error ();
54 void
55 copyunion11111 (void)
57 testunion *local = &globuf;
58 globuf.f1 = 0;
59 if (local->f1 != 0)
60 link_error ();
63 void
64 copyunion111111 (testunion param)
66 static testunion local;
67 param.f1 = 0;
68 local = param;
69 if (local.f1 != 0)
70 link_error ();
73 /* There should be no reference to link_error. */
74 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } */