varasm.c (globalize_decl): New fn.
* varasm.c (globalize_decl): New fn. (assemble_start_function): Use it. (asm_emit_uninitialized): Use it. (assemble_alias): Use it. (assemble_variable): Use it. From-SVN: r50738
This commit is contained in:
parent
19c5b1cf0d
commit
9a789d73d1
3 changed files with 27 additions and 0 deletions
6
gcc/testsuite/g++.old-deja/g++.other/comdat3-aux.cc
Normal file
6
gcc/testsuite/g++.old-deja/g++.other/comdat3-aux.cc
Normal file
|
@ -0,0 +1,6 @@
|
|||
#include "comdat3.h"
|
||||
|
||||
void f ()
|
||||
{
|
||||
const bool *p = &A<int>::b;
|
||||
}
|
13
gcc/testsuite/g++.old-deja/g++.other/comdat3.C
Normal file
13
gcc/testsuite/g++.old-deja/g++.other/comdat3.C
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Test that duplicate elimination of implicit instantiations of static
|
||||
// data members works properly.
|
||||
|
||||
// Additional sources: comdat3-aux.cc
|
||||
// Additional files: comdat3.h
|
||||
|
||||
#include "comdat3.h"
|
||||
|
||||
int main ()
|
||||
{
|
||||
const bool *p = &A<int>::b;
|
||||
f ();
|
||||
}
|
8
gcc/testsuite/g++.old-deja/g++.other/comdat3.h
Normal file
8
gcc/testsuite/g++.old-deja/g++.other/comdat3.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
template <class T> struct A {
|
||||
static const bool b = false;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
const bool A<T>::b;
|
||||
|
||||
void f ();
|
Loading…
Add table
Reference in a new issue