1 // RUN: %llvmgcc -S %s -o - /dev/null 2>&1 > /dev/null | \
2 // RUN: not grep warning
5 #define ATTR_BITS(N) __attribute__((bitwidth(N)))
7 typedef int ATTR_BITS( 4) My04BitInt;
8 typedef int ATTR_BITS(16) My16BitInt;
9 typedef int ATTR_BITS(17) My17BitInt;
10 typedef int ATTR_BITS(37) My37BitInt;
11 typedef int ATTR_BITS(65) My65BitInt;
15 short ATTR_BITS(12) i12Field;
16 long ATTR_BITS(17) i17Field;
20 My37BitInt doit( short ATTR_BITS(23) num) {
22 struct MyStruct strct;
23 int bitsize1 = sizeof(My17BitInt);
24 int __attribute__((bitwidth(9))) j;
25 int bitsize2 = sizeof(j);
26 int result = bitsize1 + bitsize2;
27 strct.i17Field = result;
28 result += sizeof(struct MyStruct);
33 main ( int argc, char** argv)
35 return (int ATTR_BITS(32)) doit((short ATTR_BITS(23))argc);