blob: 4c3292c48feb5d094e25d3b3fda97bf106e207e7 [file] [log] [blame]
Daniel Dunbar80737ad2009-12-15 22:01:24 +00001// RUN: %clang -O3 -emit-llvm -S -o %t %s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// 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}