From c5235f4c0e40d0905a5183e6628ad0e08b836005 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 25 May 2011 12:20:12 +0200 Subject: [PATCH] re PR middle-end/49062 (Many C++ tests ICE on Tru64 UNIX: non-DECL_ONE_ONLY node in a same_comdat_group list) 2011-05-25 Jan Hubicka PR middle-end/49062 * ipa.c (function_and_variable_visibility): Only add to same comdat group list if DECL_ONE_ONLY. From-SVN: r174180 --- gcc/ChangeLog | 6 ++++++ gcc/ipa.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a61c9a3a22d..7d5f8bd5f0b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-05-25 Jan Hubicka + + 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 PR rtl-optimization/49014 diff --git a/gcc/ipa.c b/gcc/ipa.c index 9228f70edb3..0ac325b5d0f 100644 --- 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) -- 2.30.2