aboutsummaryrefslogtreecommitdiffstats
path: root/test/FrontendC++
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-12-24 01:10:43 +0000
committerDale Johannesen <dalej@apple.com>2009-12-24 01:10:43 +0000
commitb97a21cb2b2fccdfdcafa5cb4b8a8c7d4f9b6508 (patch)
tree06895682857c90d7c296dd77661bba85765b87d1 /test/FrontendC++
parent04b091a7822c60512285ee66b058f98399bf1cf9 (diff)
downloadexternal_llvm-b97a21cb2b2fccdfdcafa5cb4b8a8c7d4f9b6508.tar.gz
external_llvm-b97a21cb2b2fccdfdcafa5cb4b8a8c7d4f9b6508.tar.bz2
external_llvm-b97a21cb2b2fccdfdcafa5cb4b8a8c7d4f9b6508.zip
Testcase for llvm-gcc checkin 92108.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92110 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendC++')
-rw-r--r--test/FrontendC++/2009-12-23-MissingSext.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/FrontendC++/2009-12-23-MissingSext.cpp b/test/FrontendC++/2009-12-23-MissingSext.cpp
new file mode 100644
index 0000000000..ee978812c2
--- /dev/null
+++ b/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
+}