Add new testcase
authorChris Lattner <sabre@nondot.org>
Tue, 22 Jul 2003 16:18:09 +0000 (16:18 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 22 Jul 2003 16:18:09 +0000 (16:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7229 91177308-0d34-0410-b5e6-96231b3b80d8

test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr [new file with mode: 0644]
test/CFrontend/Makefile

diff --git a/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr b/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr
new file mode 100644 (file)
index 0000000..7024ff7
--- /dev/null
@@ -0,0 +1,7 @@
+/* RUN: llvmgcc -xc %s -c -o - | dis | not grep cast
+ */
+
+void test(int* array, long long N) {
+    array[N] = 33;
+}
+
index c70aed021b41302c1f62c260343943953559963e..b1017e2f17990682d139950ddb52ed6fd31fb040 100644 (file)
@@ -11,5 +11,10 @@ LEVEL = ../../..
 include $(LEVEL)/test/Makefile.tests
 
 TESTS := $(wildcard *.c)
+TR_TESTS := $(wildcard *.c.tr)
 
 all:: $(addprefix Output/, $(TESTS:%.c=%.tbc))
+all:: $(addprefix Output/, $(TR_TESTS:%=%.out))
+
+Output/%.c.tr.out: %.c.tr Output/.dir $(LCC1)
+       -$(TESTRUNR) $<