]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/65193 (ICE: Segmentation fault with -g -flto)
authorRichard Biener <rguenther@suse.de>
Fri, 27 Feb 2015 08:41:26 +0000 (08:41 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 27 Feb 2015 08:41:26 +0000 (08:41 +0000)
2015-02-27  Richard Biener  <rguenther@suse.de>

PR lto/65193
Backport from mainline
2014-07-24  Jan Hubicka  <hubicka@ucw.cz>

* lto-streamer-out.c (tree_is_indexable): Consider IMPORTED_DECL
as non-indexable.

From-SVN: r221044

gcc/ChangeLog
gcc/lto-streamer-out.c

index cc15b366e36cd45dde7c4c1d31efad473a203ed9..e181fa48bfdb70fab99afe14abf9ed7675015c4a 100644 (file)
@@ -1,3 +1,12 @@
+2015-02-27  Richard Biener  <rguenther@suse.de>
+
+       PR lto/65193
+       Backport from mainline
+       2014-07-24  Jan Hubicka  <hubicka@ucw.cz>
+       * lto-streamer-out.c (tree_is_indexable): Consider IMPORTED_DECL
+       as non-indexable.
+
 2015-02-25  Peter Bergner  <bergner@vnet.ibm.com>
 
        Backport from mainline
index 4cf6bdafc3cd11d511a33c0c21beddf06d31c7d6..2a022dee66695c6b7a79fba81282f86bdbca799f 100644 (file)
@@ -138,6 +138,9 @@ tree_is_indexable (tree t)
   if ((TREE_CODE (t) == PARM_DECL || TREE_CODE (t) == RESULT_DECL)
       && DECL_CONTEXT (t))
     return variably_modified_type_p (TREE_TYPE (DECL_CONTEXT (t)), NULL_TREE);
+  /* IMPORTED_DECL is put into BLOCK and thus it never can be shared.  */
+  else if (TREE_CODE (t) == IMPORTED_DECL)
+    return false;
   else if (((TREE_CODE (t) == VAR_DECL && !TREE_STATIC (t))
            || TREE_CODE (t) == TYPE_DECL
            || TREE_CODE (t) == CONST_DECL