blob: c9d08ef962352eb14bcb210846f8060c8f596a1b [file] [log] [blame]
; Trivial test of the use of internal versus external global
; variables.
; TODO(kschimpf) find out why lc2i is needed.
; REQUIRES: allow_llvm_ir_as_input
; RUN: %lc2i -i %s --args --verbose inst | %iflc FileCheck %s
; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; Note: PNaCl ABI Doesn't allow external globals. Hence, not tested.
@intern_global = internal global [4 x i8] c"\00\00\00\0C", align 4
define i32 @test_intern_global() {
; CHECK: define i32 @test_intern_global
entry:
%__1 = bitcast [4 x i8]* @intern_global to i32*
%v0 = load i32* %__1, align 1
ret i32 %v0
}
; ERRORS-NOT: ICE translation error