diff options
author | Chris Lattner <sabre@nondot.org> | 2002-08-19 23:09:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-08-19 23:09:30 +0000 |
commit | d366e4094a8277ec67057992ef0856eb0a835181 (patch) | |
tree | d0c30ed6ad8b76dc32952656b4fe5aba6ee3b2c0 /test | |
parent | 83c577566e3f15c09f99536e443235d0c24bf504 (diff) | |
download | external_llvm-d366e4094a8277ec67057992ef0856eb0a835181.zip external_llvm-d366e4094a8277ec67057992ef0856eb0a835181.tar.gz external_llvm-d366e4094a8277ec67057992ef0856eb0a835181.tar.bz2 |
* Build with warnings
* Add a bunch of testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CBackend/2002-08-19-ConstPointerRef.ll | 5 | ||||
-rw-r--r-- | test/CBackend/2002-08-19-ConstantExpr.ll | 7 | ||||
-rw-r--r-- | test/CBackend/2002-08-19-DataPointer.ll | 3 | ||||
-rw-r--r-- | test/CBackend/2002-08-19-FunctionPointer.ll | 3 | ||||
-rw-r--r-- | test/CBackend/Makefile | 2 | ||||
-rw-r--r-- | test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll | 5 | ||||
-rw-r--r-- | test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll | 7 | ||||
-rw-r--r-- | test/CodeGen/CBackend/2002-08-19-DataPointer.ll | 3 | ||||
-rw-r--r-- | test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll | 3 |
9 files changed, 37 insertions, 1 deletions
diff --git a/test/CBackend/2002-08-19-ConstPointerRef.ll b/test/CBackend/2002-08-19-ConstPointerRef.ll new file mode 100644 index 0000000..8654baa --- /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 0000000..dca476b --- /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 0000000..f7481ea --- /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 0000000..ac28d93 --- /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 27a3588..7e5ba7d 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 0000000..8654baa --- /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 0000000..dca476b --- /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 0000000..f7481ea --- /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 0000000..ac28d93 --- /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 + |