OSDN Git Service

2011-05-25 Jan Hubicka <jh@suse.cz>
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 May 2011 10:20:12 +0000 (10:20 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 May 2011 10:20:12 +0000 (10:20 +0000)
PR middle-end/49062
* ipa.c (function_and_variable_visibility): Only add to same
comdat group list if DECL_ONE_ONLY.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174180 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ipa.c

index a61c9a3..7d5f8bd 100644 (file)
@@ -1,3 +1,9 @@
+2011-05-25  Jan Hubicka  <jh@suse.cz>
+
+       PR middle-end/49062
+       * ipa.c (function_and_variable_visibility): Only add to same
+       comdat group list if DECL_ONE_ONLY.
+
 2011-05-25  Andrey Belevantsev  <abel@ispras.ru>
 
        PR rtl-optimization/49014
index 9228f70..0ac325b 100644 (file)
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -897,7 +897,7 @@ function_and_variable_visibility (bool whole_program)
            {
              DECL_COMDAT (node->decl) = 1;
              DECL_COMDAT_GROUP (node->decl) = DECL_COMDAT_GROUP (decl_node->decl);
-             if (!node->same_comdat_group)
+             if (DECL_ONE_ONLY (decl_node->decl) && !node->same_comdat_group)
                {
                  node->same_comdat_group = decl_node;
                  if (!decl_node->same_comdat_group)