| 1 |
; RUN: llvm-as %s -o %t.o |
| 2 |
; RUN: llvm-as %p/Inputs/weak.ll -o %t2.o |
| 3 |
|
| 4 |
; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \ |
| 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 |
target triple = "x86_64-unknown-linux-gnu" |
| 10 |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" |
| 11 |
|
| 12 |
@a = weak global i32 42 |
| 13 |
@b = global ptr @a |
| 14 |
|
| 15 |
; Test that @b and @c end up pointing to the same variable. |
| 16 |
|
| 17 |
; CHECK: @b = global ptr @a{{$}} |
| 18 |
; CHECK: @a = weak global i32 42 |
| 19 |
; CHECK: @c = global ptr @a{{$}} |