1*f4a2713aSLionel Sambuc // RUN: %clang -O3 -emit-llvm -S -o - %s | FileCheck %s
2*f4a2713aSLionel Sambuc 
f0(void)3*f4a2713aSLionel Sambuc long long f0(void) {
4*f4a2713aSLionel Sambuc  struct { unsigned f0 : 32; } x = { 18 };
5*f4a2713aSLionel Sambuc  return (long long) (x.f0 - (int) 22);
6*f4a2713aSLionel Sambuc }
7*f4a2713aSLionel Sambuc // CHECK: @f0()
8*f4a2713aSLionel Sambuc // CHECK: ret i64 4294967292
9*f4a2713aSLionel Sambuc 
f1(void)10*f4a2713aSLionel Sambuc long long f1(void) {
11*f4a2713aSLionel Sambuc  struct { unsigned f0 : 31; } x = { 18 };
12*f4a2713aSLionel Sambuc  return (long long) (x.f0 - (int) 22);
13*f4a2713aSLionel Sambuc }
14*f4a2713aSLionel Sambuc // CHECK: @f1()
15*f4a2713aSLionel Sambuc // CHECK: ret i64 -4
16*f4a2713aSLionel Sambuc 
f2(void)17*f4a2713aSLionel Sambuc long long f2(void) {
18*f4a2713aSLionel Sambuc  struct { unsigned f0     ; } x = { 18 };
19*f4a2713aSLionel Sambuc  return (long long) (x.f0 - (int) 22);
20*f4a2713aSLionel Sambuc }
21*f4a2713aSLionel Sambuc // CHECK: @f2()
22*f4a2713aSLionel Sambuc // CHECK: ret i64 4294967292
23