[LLVMbugs] [Bug 480] NEW: [llvmg++] explicit instantiation of static template var does not have weak linkage

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Dec 9 22:20:13 PST 2004


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=480

           Summary: [llvmg++] explicit instantiation of static template var
                    does not have weak linkage
           Product: tools
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-g++
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org


Take this testcase:

-----------
struct __Atomicity_lock {
  static volatile int _S_atomicity_lock;
};
template <int __inst>
volatile int __Atomicity_lock<__inst>::_S_atomicity_lock = 0;
template volatile int __Atomicity_lock<0>::_S_atomicity_lock;
-----------

And compile it with llvmg++.  The
_ZN16__Atomicity_lockILi0EE17_S_atomicity_lockE variable gets strong linkage
instead of weak linkage.  It's not clear how, but this breaks the libstdc++
build on FreeBSD, but apparently not on other platforms.

-Chris



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the llvm-bugs mailing list