]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
lto-streamer-out.c (tree_is_indexable): Consider IMPORTED_DECL as non-indexable.
authorJan Hubicka <hubicka@ucw.cz>
Thu, 24 Jul 2014 13:52:49 +0000 (15:52 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 24 Jul 2014 13:52:49 +0000 (13:52 +0000)
* lto-streamer-out.c (tree_is_indexable): Consider IMPORTED_DECL
as non-indexable.

From-SVN: r212992

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

index f902436949ada0c2944d833658ed0e6679acf155..893100c81b190259abc115c25b139f95408cc51b 100644 (file)
@@ -1,3 +1,8 @@
+2014-07-24  Jan Hubicka  <hubicka@ucw.cz>
+
+       * lto-streamer-out.c (tree_is_indexable): Consider IMPORTED_DECL
+       as non-indexable.
+
 2014-07-24  Jan Hubicka  <hubicka@ucw.cz>
 
        PR lto/61802
index 75332f94928323f80de7fe7914348575855c5115..355ceeaaf08a0b37cd555d65eb6c46056fff5870 100644 (file)
@@ -139,6 +139,9 @@ tree_is_indexable (tree t)
      definition.  */
   if (TREE_CODE (t) == PARM_DECL || TREE_CODE (t) == RESULT_DECL)
     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