https://llvm.org/bugs/show_bug.cgi?id=30363

            Bug ID: 30363
           Summary: IRLinker::run(): Assertion `!GV->isDeclaration()'
                    failed.
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: gold-plugin
          Assignee: unassignedb...@nondot.org
          Reporter: dav...@freebsd.org
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

Minimal repro:

; RUN: llvm-as %s -o %t.o
; RUN: %gold -shared -m elf_x86_64 -o %t2 -plugin %llvmshlibdir/LLVMgold.so
%t.o

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

module asm ".weak patatino"
module asm ".equ patatino, foo"

declare void @patatino()

define void @foo() {
  ret void
}

define void @_start() {
  call void @patatino()
  ret void
}


$ /usr/bin/ld.gold -shared -m elf_x86_64 -o
/home/davide/work/llvm/build/test/tools/gold/X86/Output/module_asm.ll.tmp2
-plugin /home/davide/work/llvm/build/./lib/LLVMgold.so
/home/davide/work/llvm/build/test/tools/gold/X86/Output/module_asm.ll.tmp.o
ld.gold: ../lib/Linker/IRMover.cpp:1240: llvm::Error (anonymous
namespace)::IRLinker::run(): Assertion `!GV->isDeclaration()' failed.
Aborted (core dumped)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to