Add include needed for MSVC.
[clang/acc.git] / test / CodeGen / bitfield-promote.c
blob5894e51626da236a405ac75ccc7053fb9de8c2cd
1 // RUN: clang -O3 -emit-llvm -S -o %t %s &&
2 // RUN: grep 'ret i64 4294967292' %t | count 2 &&
3 // RUN: grep 'ret i64 -4' %t | count 1 &&
4 // RUN: true
6 long long f0(void) {
7 struct { unsigned f0 : 32; } x = { 18 };
8 return (long long) (x.f0 - (int) 22);
11 long long f1(void) {
12 struct { unsigned f0 : 31; } x = { 18 };
13 return (long long) (x.f0 - (int) 22);
16 long long f2(void) {
17 struct { unsigned f0 ; } x = { 18 };
18 return (long long) (x.f0 - (int) 22);