blob: 87a9e9a49399729c639b9028b5e2ad2ba4c971b5 [file] [log] [blame]
Chris Lattner285c68d2001-10-13 07:15:38 +00001
2%MyVar = uninitialized global int
3%MyIntList = global { \2 *, int } { { \2, int }* null, int 17 }
4 uninitialized global int ; int*:0
5
6%AConst = constant int 123
7
8declare int "foo"(int %blah) ;; Declared in testlink2.ll
9
10declare void "print"(int %Value)
11
12implementation
13
14void "main"()
15begin
16 %v1 = load int* %MyVar
17 call void %print(int %v1) ;; Should start out 4
18
19 %v2 = load { \2 *, int }* %MyIntList, ubyte 1
20 call void %print(int %v2) ;; Should start out 17
21
22 call int %foo(int 5) ;; Modify global variablesx
23
24 %v3 = load int* %MyVar
25 call void %print(int %v3) ;; Should now be 5
26
27 %v4 = load { \2 *, int }* %MyIntList, ubyte 1
28 call void %print(int %v4) ;; Should start out 12
29
30 ret void
31end
32