re PR c++/51832 (Rev.182970 causes LTO link errors (multiple definitions of allocator_traits))
PR c++/51832 * varpool.c (varpool_analyze_pending_decls): Copy DECL_EXTERNAL for extra name aliases. From-SVN: r183396
This commit is contained in:
parent
ca10595cf4
commit
bbe04f213d
@ -1,3 +1,9 @@
|
||||
2012-01-22 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/51832
|
||||
* varpool.c (varpool_analyze_pending_decls): Copy DECL_EXTERNAL
|
||||
for extra name aliases.
|
||||
|
||||
2012-01-22 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
PR rtl-optimization/51924
|
||||
|
@ -1,3 +1,10 @@
|
||||
2012-01-22 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/51832
|
||||
* g++.dg/lto/pr51832.h: New.
|
||||
* g++.dg/lto/pr51832_0.C: New.
|
||||
* g++.dg/lto/pr51832_1.C: New.
|
||||
|
||||
2012-01-22 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc.dg/ext-elim-1.c: New test.
|
||||
|
6
gcc/testsuite/g++.dg/lto/pr51832.h
Normal file
6
gcc/testsuite/g++.dg/lto/pr51832.h
Normal file
@ -0,0 +1,6 @@
|
||||
template<class...T> struct A
|
||||
{
|
||||
static int i;
|
||||
};
|
||||
|
||||
inline void f() { A<int>::i = 0; }
|
7
gcc/testsuite/g++.dg/lto/pr51832_0.C
Normal file
7
gcc/testsuite/g++.dg/lto/pr51832_0.C
Normal file
@ -0,0 +1,7 @@
|
||||
// PR c++/51832
|
||||
// { dg-lto-do link }
|
||||
// { dg-lto-options { "-std=c++11 -flto -fabi-version=2" } }
|
||||
|
||||
#include "pr51832.h"
|
||||
|
||||
int main() { }
|
1
gcc/testsuite/g++.dg/lto/pr51832_1.C
Normal file
1
gcc/testsuite/g++.dg/lto/pr51832_1.C
Normal file
@ -0,0 +1 @@
|
||||
#include "pr51832.h"
|
@ -484,6 +484,7 @@ varpool_analyze_pending_decls (void)
|
||||
{
|
||||
DECL_WEAK (node->decl) = DECL_WEAK (node->alias_of);
|
||||
TREE_PUBLIC (node->decl) = TREE_PUBLIC (node->alias_of);
|
||||
DECL_EXTERNAL (node->decl) = DECL_EXTERNAL (node->alias_of);
|
||||
DECL_VISIBILITY (node->decl) = DECL_VISIBILITY (node->alias_of);
|
||||
if (TREE_PUBLIC (node->decl))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user