public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Don't ICE in function_and_variable_visibility on Tru64 UNIX (PR middle-end/49062)
@ 2011-05-25 12:36 Rainer Orth
  0 siblings, 0 replies; only message in thread
From: Rainer Orth @ 2011-05-25 12:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jan Hubicka

Almost 400 c++ and libstdc++ testcases ICE on Tru64 UNIX since Jan's
patch

2011-05-06  Jan Hubicka  <jh@suse.cz>

    * cgraph.c (cgraph_add_thunk): Create real function node instead
    of alias node; finalize it and mark needed/reachale; arrange visibility
    to be right and add it into the corresponding same comdat group list.
    (dump_cgraph_node): Dump thunks.

as described in the PR.

He provided the following patch in private mail.  I tested it on
alpha-dec-osf5.1b by rebuilding cc1plus and rerunning the g++ and
libstdc++-v3 testsuites: all failures were gone.

Approved in private mail, committed to mainline.

	Rainer


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.

diff --git a/gcc/ipa.c b/gcc/ipa.c
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -897,7 +897,7 @@ function_and_variable_visibility (bool w
 	    {
 	      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)


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-25 10:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 12:36 Don't ICE in function_and_variable_visibility on Tru64 UNIX (PR middle-end/49062) Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).