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
|
@ -0,0 +1,6 @@
|
|||
#include "comdat3.h"
|
||||
|
||||
void f ()
|
||||
{
|
||||
const bool *p = &A<int>::b;
|
||||
}
|
|
@ -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 ();
|
||||
}
|
|
@ -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…
Reference in New Issue