f4a2713ac8
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
22 lines
498 B
C
22 lines
498 B
C
// RUN: %clang -O3 -emit-llvm -S -o - %s | FileCheck %s
|
|
|
|
long long f0(void) {
|
|
struct { unsigned f0 : 32; } x = { 18 };
|
|
return (long long) (x.f0 - (int) 22);
|
|
}
|
|
// CHECK: @f0()
|
|
// CHECK: ret i64 4294967292
|
|
|
|
long long f1(void) {
|
|
struct { unsigned f0 : 31; } x = { 18 };
|
|
return (long long) (x.f0 - (int) 22);
|
|
}
|
|
// CHECK: @f1()
|
|
// CHECK: ret i64 -4
|
|
|
|
long long f2(void) {
|
|
struct { unsigned f0 ; } x = { 18 };
|
|
return (long long) (x.f0 - (int) 22);
|
|
}
|
|
// CHECK: @f2()
|
|
// CHECK: ret i64 4294967292
|