diff --git a/test/CBackend/2002-08-19-ConstPointerRef.ll b/test/CBackend/2002-08-19-ConstPointerRef.ll new file mode 100644 index 00000000000..8654baa6af5 --- /dev/null +++ b/test/CBackend/2002-08-19-ConstPointerRef.ll @@ -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 index 00000000000..dca476b1d2e --- /dev/null +++ b/test/CBackend/2002-08-19-ConstantExpr.ll @@ -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 index 00000000000..f7481ea89b2 --- /dev/null +++ b/test/CBackend/2002-08-19-DataPointer.ll @@ -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 index 00000000000..ac28d939327 --- /dev/null +++ b/test/CBackend/2002-08-19-FunctionPointer.ll @@ -0,0 +1,3 @@ +%fptr = global void() * %f ;; Forward ref method defn +declare void "f"() ;; External method + diff --git a/test/CBackend/Makefile b/test/CBackend/Makefile index 27a3588bf96..7e5ba7ddefb 100644 --- a/test/CBackend/Makefile +++ b/test/CBackend/Makefile @@ -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 index 00000000000..8654baa6af5 --- /dev/null +++ b/test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll @@ -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 index 00000000000..dca476b1d2e --- /dev/null +++ b/test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll @@ -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 index 00000000000..f7481ea89b2 --- /dev/null +++ b/test/CodeGen/CBackend/2002-08-19-DataPointer.ll @@ -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 index 00000000000..ac28d939327 --- /dev/null +++ b/test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll @@ -0,0 +1,3 @@ +%fptr = global void() * %f ;; Forward ref method defn +declare void "f"() ;; External method +