blob: dcf704a4390de8957d4150023e8e197c28490198 [file] [log] [blame]
Chris Lattner5bc20c72001-10-13 07:16:11 +00001; This testcase is primarily used for testing that global values can be used as
2; constant pointer initializers. This is tricky because they can be forward
3; declared and involves an icky bytecode encoding. There is no meaningful
4; optimization that can be performed on this file, it is just here to test
5; assembly and disassembly.
6;
7
8
9%t3 = global int * %t1 ;; Forward reference
10%t1 = global int 4
Vikram S. Adveb26ff622002-07-14 23:18:33 +000011%t4 = global int ** %t3 ;; reference to reference
12
Chris Lattner5bc20c72001-10-13 07:16:11 +000013%t2 = global int * %t1
14
15global float * %0 ;; Forward numeric reference
16global float * %0 ;; Duplicate forward numeric reference
17global float 0.0
18global float * %0 ;; Numeric reference
19
20
21%fptr = global void() * %f ;; Forward ref method defn
22declare void "f"() ;; External method
23
Vikram S. Adveb26ff622002-07-14 23:18:33 +000024%sptr1 = global [11x sbyte]* %somestr ;; Forward ref to a constant
25%somestr = constant [11x sbyte] c"hello world"
26%sptr2 = global [11x sbyte]* %somestr
27
Chris Lattner5bc20c72001-10-13 07:16:11 +000028implementation
29