From 6b0917f466b0eb9d1bdf222355475dff13a2f743 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 24 Jun 2018 16:11:55 +0200 Subject: [PATCH] lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable unless it is forced or nonlocal... * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL. From-SVN: r261995 --- gcc/ChangeLog | 5 +++++ gcc/lto-streamer-out.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 006dae5e784..61df1473fcc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-06-22 Jan Hubicka + + * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable + unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL. + 2018-06-22 Maya Rashish * doc/invoke.texi (mno-fancy-math-387): Update for changes diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 313b76e5018..e7769f8adc9 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -134,9 +134,12 @@ 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. */ + /* IMPORTED_DECL is put into BLOCK and thus it never can be shared. + We should no longer need to stream it. */ else if (TREE_CODE (t) == IMPORTED_DECL) - return false; + gcc_unreachable (); + else if (TREE_CODE (t) == LABEL_DECL) + return FORCED_LABEL (t) || DECL_NONLOCAL (t); else if (((VAR_P (t) && !TREE_STATIC (t)) || TREE_CODE (t) == TYPE_DECL || TREE_CODE (t) == CONST_DECL -- 2.30.2