blob: 19d550f2f86e2e613045af6b3d320f041579e1b2 [file] [log] [blame]
Daniel Dunbar8b576972009-11-08 01:45:36 +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
Douglas Gregor8d9c5092009-05-01 20:41:21 +00004// 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}