re PR middle-end/41611 (guard variable is emitted even when the guarded symbol isn't)
PR c++/41611 * decl2.c (get_guard): Copy DECL_COMDAT. (comdat_linkage): Set DECL_COMDAT unconditionally. From-SVN: r154885
This commit is contained in:
parent
e4ad8df086
commit
0735734176
|
@ -1,3 +1,9 @@
|
|||
2009-12-01 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/41611
|
||||
* decl2.c (get_guard): Copy DECL_COMDAT.
|
||||
(comdat_linkage): Set DECL_COMDAT unconditionally.
|
||||
|
||||
2009-12-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/3187
|
||||
|
|
|
@ -1574,8 +1574,7 @@ comdat_linkage (tree decl)
|
|||
}
|
||||
}
|
||||
|
||||
if (DECL_LANG_SPECIFIC (decl))
|
||||
DECL_COMDAT (decl) = 1;
|
||||
DECL_COMDAT (decl) = 1;
|
||||
}
|
||||
|
||||
/* For win32 we also want to put explicit instantiations in
|
||||
|
@ -2555,6 +2554,7 @@ get_guard (tree decl)
|
|||
TREE_PUBLIC (guard) = TREE_PUBLIC (decl);
|
||||
TREE_STATIC (guard) = TREE_STATIC (decl);
|
||||
DECL_COMMON (guard) = DECL_COMMON (decl);
|
||||
DECL_COMDAT (guard) = DECL_COMDAT (decl);
|
||||
DECL_COMDAT_GROUP (guard) = DECL_COMDAT_GROUP (decl);
|
||||
if (TREE_PUBLIC (decl))
|
||||
DECL_WEAK (guard) = DECL_WEAK (decl);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2009-12-01 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/41611
|
||||
* g++.dg/abi/guard1.C: New.
|
||||
|
||||
2009-12-91 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* gcc.target/i386/vperm-v4sf-1.c (dg-options): Use -msse.
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// PR c++/41611
|
||||
// { dg-final { scan-assembler-not "_ZGVZN1A1fEvE1i" } }
|
||||
|
||||
struct A {
|
||||
static int f()
|
||||
{
|
||||
static int &i = *new int();
|
||||
return i;
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue