summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-06-15 18:26:32 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-06-15 18:26:32 +0000
commit7e68c88bf7c4007ee3ef7c4884af1d45456c2e7a (patch)
treee49689eeacd3fa3e29276da8e6a58f854cbd4e4e /clang/test/CodeGen
parent967d584a3a118fb24be9acee2cb1176279a976c7 (diff)
downloadbcm5719-llvm-7e68c88bf7c4007ee3ef7c4884af1d45456c2e7a.tar.gz
bcm5719-llvm-7e68c88bf7c4007ee3ef7c4884af1d45456c2e7a.zip
Fix a regression from r132957 involving complex integers. (Fixes failures on gcc-testsuite bot.)
llvm-svn: 133069
Diffstat (limited to 'clang/test/CodeGen')
-rw-r--r--clang/test/CodeGen/complex-indirect.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGen/complex-indirect.c b/clang/test/CodeGen/complex-indirect.c
new file mode 100644
index 00000000000..fbe73d6ae29
--- /dev/null
+++ b/clang/test/CodeGen/complex-indirect.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s
+
+// Make sure this doesn't crash, and that we don't generate a byval alloca
+// with insufficient alignment.
+
+void a(int,int,int,int,int,int,__complex__ char);
+void b(__complex__ char *y) { a(0,0,0,0,0,0,*y); }
+// CHECK: define void @b
+// CHECK: alloca %0, align 8
+// CHECK: call void @a(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, %0* byval align 8
OpenPOWER on IntegriCloud