Rafael Espindola | cb9cd7f | 2014-08-12 15:39:14 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as %s -o %t.o |
| 2 | ; RUN: llvm-as %p/Inputs/weak.ll -o %t2.o |
| 3 | |
| 4 | ; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \ |
| 5 | ; RUN: --plugin-opt=emit-llvm \ |
| 6 | ; RUN: -shared %t.o %t2.o -o %t3.o |
| 7 | ; RUN: llvm-dis %t3.o -o - | FileCheck %s |
| 8 | |
| 9 | @a = weak global i32 42 |
| 10 | @b = global i32* @a |
| 11 | |
| 12 | ; Test that @b and @c end up pointing to the same variable. |
| 13 | |
| 14 | ; CHECK: @a = weak global i32 42 |
Rafael Espindola | daa117b | 2014-08-12 15:55:27 +0000 | [diff] [blame] | 15 | ; CHECK: @b = global i32* @a{{$}} |
| 16 | ; CHECK: @c = global i32* @a{{$}} |