aboutsummaryrefslogtreecommitdiffstats
path: root/test/CFrontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-08 05:16:29 +0000
committerChris Lattner <sabre@nondot.org>2008-01-08 05:16:29 +0000
commit83d760ba8eebc0a524cd9b1157eb3b4b151a5aef (patch)
treef4ef6f4fcde4d7e1e78de96c126a9aaf9e47451d /test/CFrontend
parent0d893b4038d11c619ef9679de8e0c62f60c73377 (diff)
downloadexternal_llvm-83d760ba8eebc0a524cd9b1157eb3b4b151a5aef.zip
external_llvm-83d760ba8eebc0a524cd9b1157eb3b4b151a5aef.tar.gz
external_llvm-83d760ba8eebc0a524cd9b1157eb3b4b151a5aef.tar.bz2
Testcase for PR1721
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CFrontend')
-rw-r--r--test/CFrontend/2008-01-07-UnusualIntSize.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CFrontend/2008-01-07-UnusualIntSize.c b/test/CFrontend/2008-01-07-UnusualIntSize.c
new file mode 100644
index 0000000..924ae2b
--- /dev/null
+++ b/test/CFrontend/2008-01-07-UnusualIntSize.c
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc %s -S -o - -O | grep {and.*8589934591}
+// PR1721
+
+struct s {
+ unsigned long long u33: 33;
+} a, b;
+
+// This should turn into a real 33-bit add, not a 64-bit add.
+_Bool test(void) {
+ return a.u33 + b.u33 != 0;
+}