This should always be signed chars, so use int8_t. This fixes a miscompile when
[llvm/stm8.git] / test / FrontendC++ / 2009-10-27-crash.cpp
blobda73988b697649c77f7bc4cfe0709174ce211cf6
1 // RUN: %llvmgxx -S %s -o /dev/null
2 // Radar 7328944
4 typedef struct
6 unsigned short a : 1;
7 unsigned short b : 2;
8 unsigned short c : 1;
9 unsigned short d : 1;
10 unsigned short e : 1;
11 unsigned short f : 1;
12 unsigned short g : 2;
13 unsigned short : 7;
14 union
16 struct
18 unsigned char h : 1;
19 unsigned char i : 1;
20 unsigned char j : 1;
21 unsigned char : 5;
23 struct
25 unsigned char k : 3;
26 unsigned char : 5;
29 unsigned char : 8;
30 } tt;
32 typedef struct
34 unsigned char s;
35 tt t;
36 unsigned int u;
37 } ttt;
39 ttt X = {
41 { 0 },
42 55,