brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 114f048 Raw
55 lines · c
1// RUN: %clang_cc1 -emit-llvm -triple i386-linux-gnu -o %t %s2// RUN: FileCheck --input-file=%t %s3 4// CHECK: @test1_f = extern_weak global i325extern int test1_f;6static int test1_g __attribute__((weakref("test1_f")));7int test1_h(void) {8  return test1_g;9}10 11// CHECK: @test2_f = global i32 0, align 412int test2_f;13static int test2_g __attribute__((weakref("test2_f")));14int test2_h(void) {15  return test2_g;16}17 18// CHECK: @test3_f = external global i3219extern int test3_f;20static int test3_g __attribute__((weakref("test3_f")));21int test3_foo(void) {22  return test3_f;23}24int test3_h(void) {25  return test3_g;26}27 28// CHECK: @test4_f = global i32 0, align 429extern int test4_f;30static int test4_g __attribute__((weakref("test4_f")));31int test4_h(void) {32  return test4_g;33}34int test4_f;35 36// CHECK: @test5_f = external global i3237extern int test5_f;38static int test5_g __attribute__((weakref("test5_f")));39int test5_h(void) {40  return test5_g;41}42int test5_foo(void) {43  return test5_f;44}45 46// CHECK: @test6_f = extern_weak global i3247extern int test6_f __attribute__((weak));48static int test6_g __attribute__((weakref("test6_f")));49int test6_h(void) {50  return test6_g;51}52int test6_foo(void) {53  return test6_f;54}55