2014-07-29 Ed Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / gcc.dg / h8300-bit-insn-ice.c
blob442dc4bb9f2cbf455086005fb2ab544a674ef555
1 /* { dg-skip-if "" { "h8300*-*-*" } "*" "-msx*" } */
2 /* ICE for bit instruction generation using 16-bit const */
4 __extension__ struct st_mstp
6 union
8 unsigned short WORD;
9 struct
11 unsigned char ACSE:1;
12 unsigned char _EXDMAC:1;
13 unsigned char _DMAC:1;
14 unsigned char _DTC:1;
15 unsigned char:2;
16 unsigned char _TMR23:1;
17 unsigned char _TMR01:1;
18 unsigned char:2;
19 unsigned char _DA:1;
20 unsigned char:1;
21 unsigned char _AD:1;
22 unsigned char:1;
23 unsigned char _TPUU:1;
24 unsigned char _TPUL:1;
25 } BIT;
26 } CRA;
28 #define MSTP (*(volatile struct st_mstp *)0xFFFDC8)
29 #define MSTPA_EXDMA 0x4000
30 #define MSTPA_AND 0xFEFF
32 int
33 main ()
35 MSTP.CRA.WORD |= MSTPA_EXDMA;
36 MSTP.CRA.WORD ^= MSTPA_EXDMA;
37 MSTP.CRA.WORD &= MSTPA_AND;
38 return 0;