If dejagnu is not found, tell the user instead of bombing out with an
[oota-llvm.git] / test / Feature / globalvars.ll
index b189dfc754180503d09c1b87e5f59b92767adfbc..0b20c1b77366ff8d246e12d8684c6d1b61d430af 100644 (file)
@@ -1,16 +1,26 @@
+; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
+; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
+; RUN: diff %t1.ll %t2.ll
+
 
 %MyVar     = uninitialized global int
 %MyIntList = uninitialized global { \2 *, int }
-             uninitialized global int      ; int*:0
+             external global int      ; int*:0
 
 %AConst    = constant int 123
 
+%AString   = constant [4 x ubyte] c"test"
+
+%ZeroInit  = global { [100 x int ], [40 x float ] } { [100 x int] zeroinitializer,
+                                                      [40  x float] zeroinitializer }
+
 implementation
 
 int "foo"(int %blah)
 begin
        store int 5, int *%MyVar
-       store int 12, { \2 *, int } * %MyIntList, ubyte 1
-       ret int %blah
+       %idx = getelementptr { \2 *, int } * %MyIntList, long 0, ubyte 1
+       store int 12, int* %idx
+       ret int %blah
 end