First Last Prev Next    No search results available
Details
: Linking weak and strong global variables is dependent on ...
Bug#: 245
: libraries
: Transformation Utilities
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.0
: P2
: normal
: 1.2

:
: compile-fail
:
:
  Show dependency tree - Show dependency graph
People
Reporter: John T. Criswell <criswell@uiuc.edu>
Assigned To: Chris Lattner <sabre@nondot.org>

Attachments
First test file for reproducing the problem (30 bytes, text/plain)
2004-02-17 15:29, John T. Criswell
Details
Second file for reproducing the problem. (24 bytes, text/plain)
2004-02-17 15:30, John T. Criswell
Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2004-02-17 15:28
Attached are two LLVM assembly languages files.  Both define the same global
variable with the same initialization value, but one has weak linkage and the
other has strong linkage.

llvm-link -o test test1.bc test2.bc

works, but

llvm-link -o test test2.bc test1.bc

does not.
------- Comment #1 From John T. Criswell 2004-02-17 15:29:33 -------
Created an attachment (id=83) [details]
First test file for reproducing the problem
------- Comment #2 From John T. Criswell 2004-02-17 15:30:01 -------
Created an attachment (id=84) [details]
Second file for reproducing the problem.
------- Comment #3 From John T. Criswell 2004-02-17 15:31:19 -------
The assertion failure is:

llvm-link: Linker.cpp:572: bool LinkGlobalInits(llvm::Module*, const
llvm::Module*, std::map<const llvm::Value*, llvm::Value*, std::less<const
llvm::Value*>, std::allocator<std::pair<const llvm::Value* const, llvm::Value*>
> >&, std::string*): Assertion `SGV->getLinkage() == DGV->getLinkage()' failed.

(The line number is a little off due to added debugging.  It was originally line
569).
------- Comment #4 From Chris Lattner 2004-02-17 15:32:26 -------
Great catch!  I'm preparing a fix.

-Chris
------- Comment #5 From Chris Lattner 2004-02-17 15:59:30 -------
Fixed.  Patch here:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040216/011833.html

Testcase here:
Regression/Linker/2004-02-17-WeakStrongLinkage.ll

-Chris

First Last Prev Next    No search results available