aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-23 17:31:33 +0000
committerChris Lattner <sabre@nondot.org>2003-10-23 17:31:33 +0000
commiteea7cca3663393bc218089139ec8df6302863203 (patch)
tree6609ef037e4795b475d21b84e443c25b10c9e092
parentcadff4477efd25bd08a9c92a76a1d7fb765f9010 (diff)
Zero arg varargs functions are legal in LLVM, but not in C.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9425 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CBackend/2003-10-23-ZeroArgVarargs.ll9
-rw-r--r--test/CodeGen/CBackend/2003-10-23-ZeroArgVarargs.ll9
2 files changed, 18 insertions, 0 deletions
diff --git a/test/CBackend/2003-10-23-ZeroArgVarargs.ll b/test/CBackend/2003-10-23-ZeroArgVarargs.ll
new file mode 100644
index 0000000000..4ba97411f0
--- /dev/null
+++ b/test/CBackend/2003-10-23-ZeroArgVarargs.ll
@@ -0,0 +1,9 @@
+
+declare sbyte* %llvm.va_start()
+declare void %llvm.va_end(sbyte*)
+
+void %test(...) {
+ %P = call sbyte* %llvm.va_start()
+ call void %llvm.va_end(sbyte* %P)
+ ret void
+}
diff --git a/test/CodeGen/CBackend/2003-10-23-ZeroArgVarargs.ll b/test/CodeGen/CBackend/2003-10-23-ZeroArgVarargs.ll
new file mode 100644
index 0000000000..4ba97411f0
--- /dev/null
+++ b/test/CodeGen/CBackend/2003-10-23-ZeroArgVarargs.ll
@@ -0,0 +1,9 @@
+
+declare sbyte* %llvm.va_start()
+declare void %llvm.va_end(sbyte*)
+
+void %test(...) {
+ %P = call sbyte* %llvm.va_start()
+ call void %llvm.va_end(sbyte* %P)
+ ret void
+}