blob: 5894e51626da236a405ac75ccc7053fb9de8c2cd [file] [log] [blame]
Douglas Gregorfc24e442009-05-01 20:41:21 +00001// 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
5
6long long f0(void) {
7 struct { unsigned f0 : 32; } x = { 18 };
8 return (long long) (x.f0 - (int) 22);
9}
10
11long long f1(void) {
12 struct { unsigned f0 : 31; } x = { 18 };
13 return (long long) (x.f0 - (int) 22);
14}
15
16long long f2(void) {
17 struct { unsigned f0 ; } x = { 18 };
18 return (long long) (x.f0 - (int) 22);
19}