brintos

brintos / llvm-project-archived public Read only

0
0
Text · 452 B · 950de8f Raw
20 lines · plain
1; Test that global constructors behind casts are run2;3; RUN: lli -jit-kind=orc %s | FileCheck %s4;5; CHECK: constructor6 7declare i32 @puts(ptr)8 9@.str = private constant [12 x i8] c"constructor\00"10@llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 1, ptr @constructor, ptr null }]11 12define internal i32 @constructor() #0 {13  %call = tail call i32 @puts(ptr @.str)14  ret i32 015}16 17define i32 @main()  {18  ret i32 019}20