summaryrefslogtreecommitdiffstats
path: root/llvm/test/LTO/Resolution/X86/commons.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/LTO/Resolution/X86/commons.ll')
-rw-r--r--llvm/test/LTO/Resolution/X86/commons.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/LTO/Resolution/X86/commons.ll b/llvm/test/LTO/Resolution/X86/commons.ll
new file mode 100644
index 00000000000..b3e504835af
--- /dev/null
+++ b/llvm/test/LTO/Resolution/X86/commons.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as -o %t1.bc %s
+; RUN: llvm-as -o %t2.bc %p/Inputs/commons.ll
+; RUN: llvm-lto2 %t1.bc -r=%t1.bc,x,l %t2.bc -r=%t2.bc,x,pl -o %t.out -save-temps
+; RUN: llvm-dis -o - %t.out.0.0.preopt.bc | FileCheck %s
+
+; A strong definition should override the common
+; CHECK: @x = global i32 42, align 4
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+@x = common global i16 0, align 2
OpenPOWER on IntegriCloud