[llvm-bugs] [Bug 30363] New: IRLinker::run(): Assertion `!GV->isDeclaration()' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 12 21:50:22 PDT 2016


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: unassignedbugs at nondot.org
          Reporter: davide at freebsd.org
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160913/3481e786/attachment.html>


More information about the llvm-bugs mailing list