* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / sra-1.c
blob59213039fc2d2387c0ac3f2c0b34652759107394
1 /* Let gimple verifier check what SRA does to unions and single-field
2 strucutres . */
4 struct sim_struct
6 int x;
7 };
9 extern struct sim_struct get_x(void);
11 struct sim_struct foo (void)
13 struct sim_struct simple;
15 simple = get_x ();
16 if (simple.x % 2)
17 simple.x = 39;
18 else
19 simple.x -=8;
21 return simple;
24 struct sim_cmplx
26 _Complex double c;
29 extern struct sim_cmplx get_sc (void);
31 _Complex double foo_c (void)
33 struct sim_cmplx simple;
35 simple = get_sc ();
36 if (__real__ simple.c > 200.3)
37 __imag__ simple.c -= 2.4;
39 return simple.c;
43 union sim_union
45 int i;
46 float d;
49 extern union sim_union get_y (void);
51 union sim_union bar (void)
53 union sim_union simple;
55 simple = get_y ();
56 if (simple.d > 8.2)
57 simple.i = 300;
59 return simple;
62 extern int get_int (void);
64 int bar_i (void)
66 union sim_union simple;
68 simple = get_y ();
69 if (simple.d > 8.2)
70 simple.i = get_int ();
72 return simple.i;