blob: b8df1b81e1ea9aae32bf845471f2035a8f7c9383 [file] [log] [blame]
Reid Spencerc0948362007-01-16 18:08:22 +00001; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
2; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3; RUN: diff %t1.ll %t2.ll
Reid Spencer4b8c4b32007-01-16 22:31:46 +00004
Reid Spencerc0948362007-01-16 18:08:22 +00005
6
7%MyVar = external global i27
8%MyIntList = external global { \2 *, i27 }
9 external global i27 ; i27*:0
10
11%AConst = constant i27 123
12
13%AString = constant [4 x i8] c"test"
14
15%ZeroInit = global { [100 x i27 ], [40 x float ] } { [100 x i27] zeroinitializer,
16 [40 x float] zeroinitializer }
17
18implementation
19
20define i27 "foo"(i27 %blah)
21begin
22 store i27 5, i27 *%MyVar
Reid Spencer4b8c4b32007-01-16 22:31:46 +000023 %idx = getelementptr { \2 *, i27 } * %MyIntList, i64 0, i32 1
Reid Spencerc0948362007-01-16 18:08:22 +000024 store i27 12, i27* %idx
25 ret i27 %blah
26end
27