blob: e6ff7b3952c5d4232b958cfdb5c0b1b16937358d [file] [log] [blame]
Eric Christopher8a8d6d82011-08-19 21:24:37 +00001// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
2// The store of p.y into the temporary was not
3// getting extended to 32 bits, so uninitialized
4// bits of the temporary were used. 7366161.
5struct foo {
6 char x:8;
7 signed int y:24;
8};
9int bar(struct foo p, int x) {
10// CHECK: bar
11// CHECK: and {{.*}} 16777215
12// CHECK: and {{.*}} 16777215
13 x = (p.y > x ? x : p.y);
14 return x;
15// CHECK: ret
16}