re PR c++/63942 (constexpr conflicts with previous declaration)
PR c++/63942 * mangle.c (mangle_decl): If we aren't going to create a symbol alias, don't build the alias DECL either. From-SVN: r218016
This commit is contained in:
parent
691b9fb7a2
commit
f9b1eec215
@ -1,3 +1,9 @@
|
|||||||
|
2014-11-24 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/63942
|
||||||
|
* mangle.c (mangle_decl): If we aren't going to create a symbol
|
||||||
|
alias, don't build the alias DECL either.
|
||||||
|
|
||||||
2014-11-24 Paolo Carlini <paolo.carlini@oracle.com>
|
2014-11-24 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
PR c++/63905
|
PR c++/63905
|
||||||
|
@ -3518,6 +3518,12 @@ mangle_decl (const tree decl)
|
|||||||
if (IDENTIFIER_GLOBAL_VALUE (id2))
|
if (IDENTIFIER_GLOBAL_VALUE (id2))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
struct cgraph_node *n = NULL;
|
||||||
|
if (TREE_CODE (decl) == FUNCTION_DECL
|
||||||
|
&& !(n = cgraph_node::get (decl)))
|
||||||
|
/* Don't create an alias to an unreferenced function. */
|
||||||
|
return;
|
||||||
|
|
||||||
tree alias = make_alias_for (decl, id2);
|
tree alias = make_alias_for (decl, id2);
|
||||||
SET_IDENTIFIER_GLOBAL_VALUE (id2, alias);
|
SET_IDENTIFIER_GLOBAL_VALUE (id2, alias);
|
||||||
DECL_IGNORED_P (alias) = 1;
|
DECL_IGNORED_P (alias) = 1;
|
||||||
@ -3526,11 +3532,7 @@ mangle_decl (const tree decl)
|
|||||||
if (vague_linkage_p (decl))
|
if (vague_linkage_p (decl))
|
||||||
DECL_WEAK (alias) = 1;
|
DECL_WEAK (alias) = 1;
|
||||||
if (TREE_CODE (decl) == FUNCTION_DECL)
|
if (TREE_CODE (decl) == FUNCTION_DECL)
|
||||||
{
|
n->create_same_body_alias (alias, decl);
|
||||||
/* Don't create an alias to an unreferenced function. */
|
|
||||||
if (struct cgraph_node *n = cgraph_node::get (decl))
|
|
||||||
n->create_same_body_alias (alias, decl);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
varpool_node::create_extra_name_alias (alias, decl);
|
varpool_node::create_extra_name_alias (alias, decl);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user