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