27 lines · plain
1; RUN: %lli -jit-kind=mcjit %s2; RUN: %lli %s3;4; Verify relocations to global symbols with addend work correctly.5;6; Compiled from this C code:7;8; int test[2] = { -1, 0 };9; int *p = &test[1];10; 11; int main (void)12; {13; return *p;14; }15; 16 17@test = global [2 x i32] [i32 -1, i32 0], align 418@p = global ptr getelementptr inbounds ([2 x i32], ptr @test, i64 0, i64 1), align 819 20define i32 @main() {21entry:22 %0 = load ptr, ptr @p, align 823 %1 = load i32, ptr %0, align 424 ret i32 %125}26 27