diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-07 15:10:26 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-07 15:10:26 +0000 |
commit | 93fbbbcc2e3e3cb1b0be2ce7c5f394e6c3843438 (patch) | |
tree | bd1b5a39ccc8b70f0e46666012120ec53853f4ad /gcc/cgraph.c | |
parent | c48c273ef41d6885e7042b71ec98ab3e1c72d8a8 (diff) | |
download | gcc-93fbbbcc2e3e3cb1b0be2ce7c5f394e6c3843438.tar.gz |
PR tree-optimization/42625
* cgraph.c (cgraph_make_node_local): Clear DECL_COMDAT*,
TREE_PUBLIC, DECL_WEAK and DECL_EXTERNAL also for same_body
aliases.
* g++.dg/opt/dtor4.C: New test.
* g++.dg/opt/dtor4.h: New.
* g++.dg/opt/dtor4-aux.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155694 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index fc7ba1a50ba..baaf601c967 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1,5 +1,5 @@ /* Callgraph handling code. - Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Jan Hubicka @@ -2197,11 +2197,20 @@ cgraph_make_node_local (struct cgraph_node *node) gcc_assert (cgraph_node_can_be_local_p (node)); if (DECL_COMDAT (node->decl) || DECL_EXTERNAL (node->decl)) { + struct cgraph_node *alias; DECL_COMDAT (node->decl) = 0; DECL_COMDAT_GROUP (node->decl) = 0; TREE_PUBLIC (node->decl) = 0; DECL_WEAK (node->decl) = 0; DECL_EXTERNAL (node->decl) = 0; + for (alias = node->same_body; alias; alias = alias->next) + { + DECL_COMDAT (alias->decl) = 0; + DECL_COMDAT_GROUP (alias->decl) = 0; + TREE_PUBLIC (alias->decl) = 0; + DECL_WEAK (alias->decl) = 0; + DECL_EXTERNAL (alias->decl) = 0; + } node->local.externally_visible = false; node->local.local = true; gcc_assert (cgraph_function_body_availability (node) == AVAIL_LOCAL); |