aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/CBackend
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/CBackend')
-rw-r--r--test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll5
-rw-r--r--test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll7
-rw-r--r--test/CodeGen/CBackend/2002-08-19-DataPointer.ll3
-rw-r--r--test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll3
4 files changed, 18 insertions, 0 deletions
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
+