diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2018-06-24 16:11:55 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2018-06-24 14:11:55 +0000 |
commit | 6b0917f466b0eb9d1bdf222355475dff13a2f743 (patch) | |
tree | efa80691599a0d2371f58b0dc043f3e5a381aa67 /gcc | |
parent | adaab3058c4050348e9fa862f1909200a314c45e (diff) | |
download | gcc-6b0917f466b0eb9d1bdf222355475dff13a2f743.zip gcc-6b0917f466b0eb9d1bdf222355475dff13a2f743.tar.gz gcc-6b0917f466b0eb9d1bdf222355475dff13a2f743.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto-streamer-out.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 006dae5e..61df1473 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-06-22 Jan Hubicka <hubicka@ucw.cz> + + * 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 <coypu@sdf.org> * 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 313b76e..e7769f8 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 |