1 // RUN: %clang_cc1 -w -emit-llvm %s -O1 -o - | FileCheck %s
2 // This used to "check for bug compatibility with gcc".
3 // Now it checks that that the "weak" declaration makes the value
4 // fully interposable whereas a "selectany" one is handled as constant
7 // CHECK: @x = weak {{.*}}constant i32 123
8 const int x
__attribute((weak
)) = 123;
10 // CHECK: @y = weak_odr {{.*}}constant i32 234
11 const int y
__attribute((selectany
)) = 234;
18 // CHECK: load i32, ptr @x
19 // CHECK-NOT: ret i32 123
28 // CHECK-NOT: load i32, ptr @y