Skip to content

[llvmg++] explicit instantiation of static template var does not have weak linkage #852

@lattner

Description

@lattner
Bugzilla Link 480
Resolution FIXED
Resolved on Feb 22, 2010 12:41
Version 1.0
OS All

Extended Description

Take this testcase:


struct __Atomicity_lock {
static volatile int _S_atomicity_lock;
};
template
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillacompile-failUse [accepts-invalid] and [rejects-valid] insteadllvm-toolsAll llvm tools that do not have corresponding tag

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions