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:
Jason Merrill 2002-03-13 11:03:25 -05:00
parent 19c5b1cf0d
commit 9a789d73d1
3 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,6 @@
#include "comdat3.h"
void f ()
{
const bool *p = &A<int>::b;
}

View 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 ();
}

View 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 ();