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

2011-05-06  Jan Hubicka  <j...@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  <j...@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

Reply via email to