* Build with warnings
authorChris Lattner <sabre@nondot.org>
Mon, 19 Aug 2002 23:09:30 +0000 (23:09 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 19 Aug 2002 23:09:30 +0000 (23:09 +0000)
* Add a bunch of testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3393 91177308-0d34-0410-b5e6-96231b3b80d8

test/CBackend/2002-08-19-ConstPointerRef.ll [new file with mode: 0644]
test/CBackend/2002-08-19-ConstantExpr.ll [new file with mode: 0644]
test/CBackend/2002-08-19-DataPointer.ll [new file with mode: 0644]
test/CBackend/2002-08-19-FunctionPointer.ll [new file with mode: 0644]
test/CBackend/Makefile
test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll [new file with mode: 0644]
test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll [new file with mode: 0644]
test/CodeGen/CBackend/2002-08-19-DataPointer.ll [new file with mode: 0644]
test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll [new file with mode: 0644]

diff --git a/test/CBackend/2002-08-19-ConstPointerRef.ll b/test/CBackend/2002-08-19-ConstPointerRef.ll
new file mode 100644 (file)
index 0000000..8654baa
--- /dev/null
@@ -0,0 +1,5 @@
+; Test const pointer refs & forward references
+
+%t3 = global int * %t1           ;; Forward reference
+%t1 = global int 4
+
diff --git a/test/CBackend/2002-08-19-ConstantExpr.ll b/test/CBackend/2002-08-19-ConstantExpr.ll
new file mode 100644 (file)
index 0000000..dca476b
--- /dev/null
@@ -0,0 +1,7 @@
+global int* cast (float* %0 to int*)   ;; Forward numeric reference
+global float* %0                       ;; Duplicate forward numeric reference
+global float 0.0
+
+%array  = constant [2 x int] [ int 12, int 52 ]
+%arrayPtr = global int* getelementptr ([2 x int]* %array, uint 0, uint 0)    ;; int* &%array[0][0]
+
diff --git a/test/CBackend/2002-08-19-DataPointer.ll b/test/CBackend/2002-08-19-DataPointer.ll
new file mode 100644 (file)
index 0000000..f7481ea
--- /dev/null
@@ -0,0 +1,3 @@
+%sptr1   = global [11x sbyte]* %somestr         ;; Forward ref to a constant
+%somestr = constant [11x sbyte] c"hello world"
+
diff --git a/test/CBackend/2002-08-19-FunctionPointer.ll b/test/CBackend/2002-08-19-FunctionPointer.ll
new file mode 100644 (file)
index 0000000..ac28d93
--- /dev/null
@@ -0,0 +1,3 @@
+%fptr = global void() * %f       ;; Forward ref method defn
+declare void "f"()               ;; External method
+
index 27a3588bf961a0bbf4714868c346a2cf63a5fe43..7e5ba7ddefbe89004cf399ad94bec0106274d70d 100644 (file)
@@ -15,7 +15,7 @@ all:: $(addprefix Output/, $(TESTS:%.ll=%.to))
 
 
 Output/%.to: Output/%.c
-       gcc -c $< -o $@ || \
+       gcc -c -W -Wall $< -o $@ || \
                (rm -f $@; $(FAILURE) $@ )
 
 Output/%.c: %.ll Output/.dir $(LAS) $(LDIS)
diff --git a/test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll b/test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll
new file mode 100644 (file)
index 0000000..8654baa
--- /dev/null
@@ -0,0 +1,5 @@
+; Test const pointer refs & forward references
+
+%t3 = global int * %t1           ;; Forward reference
+%t1 = global int 4
+
diff --git a/test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll b/test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll
new file mode 100644 (file)
index 0000000..dca476b
--- /dev/null
@@ -0,0 +1,7 @@
+global int* cast (float* %0 to int*)   ;; Forward numeric reference
+global float* %0                       ;; Duplicate forward numeric reference
+global float 0.0
+
+%array  = constant [2 x int] [ int 12, int 52 ]
+%arrayPtr = global int* getelementptr ([2 x int]* %array, uint 0, uint 0)    ;; int* &%array[0][0]
+
diff --git a/test/CodeGen/CBackend/2002-08-19-DataPointer.ll b/test/CodeGen/CBackend/2002-08-19-DataPointer.ll
new file mode 100644 (file)
index 0000000..f7481ea
--- /dev/null
@@ -0,0 +1,3 @@
+%sptr1   = global [11x sbyte]* %somestr         ;; Forward ref to a constant
+%somestr = constant [11x sbyte] c"hello world"
+
diff --git a/test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll b/test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll
new file mode 100644 (file)
index 0000000..ac28d93
--- /dev/null
@@ -0,0 +1,3 @@
+%fptr = global void() * %f       ;; Forward ref method defn
+declare void "f"()               ;; External method
+