[Bug lto/51198] [c++0x] [4.7 Regression] ICE with -flto and non-static data member initializers

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 29 22:47:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51198

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |pinskia at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-11-29 22:31:20 UTC ---
A better patch which I am testing:
Index: tree.c
===================================================================
--- tree.c    (revision 181815)
+++ tree.c    (working copy)
@@ -4651,7 +4651,8 @@ free_lang_data_in_decl (tree decl)
       || (decl_function_context (decl) && !TREE_STATIC (decl)))
     DECL_INITIAL (decl) = NULL_TREE;
     }
-  else if (TREE_CODE (decl) == TYPE_DECL)
+  else if (TREE_CODE (decl) == TYPE_DECL
+       || TREE_CODE (decl) == FIELD_DECL)
     DECL_INITIAL (decl) = NULL_TREE;
   else if (TREE_CODE (decl) == TRANSLATION_UNIT_DECL
            && DECL_INITIAL (decl)

--- CUT ---
This also should reduce peak memory usage when using the non-static data member
initialization feature.



More information about the Gcc-bugs mailing list