diff options
author | Dale Johannesen <dalej@apple.com> | 2009-12-24 01:10:43 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-12-24 01:10:43 +0000 |
commit | 14ee5ead2d3559d517d97db406cd33c7dd39694d (patch) | |
tree | 860e7aef7bc9978fe1444dc2355b80e06b6b8de1 /llvm | |
parent | a8a2a33af9c152071545af08f5310bbed5aca96b (diff) | |
download | bcm5719-llvm-14ee5ead2d3559d517d97db406cd33c7dd39694d.tar.gz bcm5719-llvm-14ee5ead2d3559d517d97db406cd33c7dd39694d.zip |
Testcase for llvm-gcc checkin 92108.
llvm-svn: 92110
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/test/FrontendC++/2009-12-23-MissingSext.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/FrontendC++/2009-12-23-MissingSext.cpp b/llvm/test/FrontendC++/2009-12-23-MissingSext.cpp new file mode 100644 index 00000000000..ee978812c29 --- /dev/null +++ b/llvm/test/FrontendC++/2009-12-23-MissingSext.cpp @@ -0,0 +1,16 @@ +// RUN: %llvmgxx %s -S -o - | FileCheck %s +// The store of p.y into the temporary was not +// getting extended to 32 bits, so uninitialized +// bits of the temporary were used. 7366161. +struct foo { + char x:8; + signed int y:24; +}; +int bar(struct foo p, int x) { +// CHECK: bar +// CHECK: sext +// CHECK: sext + x = (p.y > x ? x : p.y); + return x; +// CHECK: return +} |