aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-13 22:46:24 +0000
committerChris Lattner <sabre@nondot.org>2002-04-13 22:46:24 +0000
commitcbec8be8f8f86c26147fd280912c147ad9b1e974 (patch)
tree2c266c040dd8f4b5cd220f7f0423293892f7f0af
parentff5c296498b3b1182e8d5e2515d0c15a7b558d4b (diff)
New testcase for the verifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2242 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Verifier/2002-04-13-RetTypes.ll9
-rw-r--r--test/Verifier/Makefile19
2 files changed, 28 insertions, 0 deletions
diff --git a/test/Verifier/2002-04-13-RetTypes.ll b/test/Verifier/2002-04-13-RetTypes.ll
new file mode 100644
index 0000000000..fe8d624123
--- /dev/null
+++ b/test/Verifier/2002-04-13-RetTypes.ll
@@ -0,0 +1,9 @@
+; Verify the the operand type of the ret instructions in a function match the
+; delcared return type of the function they live in.
+;
+implementation
+
+uint "testfunc"()
+begin
+ ret int* null
+end
diff --git a/test/Verifier/Makefile b/test/Verifier/Makefile
new file mode 100644
index 0000000000..2812a7e549
--- /dev/null
+++ b/test/Verifier/Makefile
@@ -0,0 +1,19 @@
+# test/Regression/Verifier/Makefile
+#
+# This directory contains regression tests for the LLVM verifier pass. Basically
+# all of these LLVM source files are invalid programs that should be marked as
+# such by the verifier
+
+LEVEL = ../../..
+include $(LEVEL)/test/Makefile.tests
+
+TESTS := $(wildcard *.ll)
+
+all:: $(addprefix Output/, $(TESTS:%.ll=%.ntbc))
+
+Output/%.ntbc: %.ll $(LAS) Output/.dir
+ @echo "======== Verifying $< ==========="
+ if $(LAS) -f $< -o /dev/null; \
+ then $(FAILURE) $@; exit 1; \
+ else touch $@; exit 0;\
+ fi