aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-streamer-out.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-10-15 18:30:15 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-10-15 18:30:15 +0000
commit7e601a1d3ef4bf1467bc85d01f641bdbbf3e7fd8 (patch)
tree19abd6e2980f99fdcc78a7477781141a9662017a /gcc/tree-streamer-out.c
parent2a0cb1644c8431660f24f25aa82118f86d7f9627 (diff)
downloadgcc-7e601a1d3ef4bf1467bc85d01f641bdbbf3e7fd8.zip
gcc-7e601a1d3ef4bf1467bc85d01f641bdbbf3e7fd8.tar.gz
gcc-7e601a1d3ef4bf1467bc85d01f641bdbbf3e7fd8.tar.bz2
lto-streamer-out.c (lto_variably_modified_type_p): New.
2019-10-15 Richard Biener <rguenther@suse.de> * lto-streamer-out.c (lto_variably_modified_type_p): New. (tree_is_indexable): Use it. * tree-streamer-out.c (pack_ts_type_common_value_fields): Stream variably_modified_type_p as TYPE_LANG_FLAG_0. * tree-streamer-in.c (unpack_ts_type_common_value_fields): Likewise. From-SVN: r277005
Diffstat (limited to 'gcc/tree-streamer-out.c')
-rw-r--r--gcc/tree-streamer-out.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c
index aadc56c..f2e4ca2 100644
--- a/gcc/tree-streamer-out.c
+++ b/gcc/tree-streamer-out.c
@@ -326,6 +326,12 @@ pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr)
bp_pack_value (bp, TYPE_RESTRICT (expr), 1);
bp_pack_value (bp, TYPE_USER_ALIGN (expr), 1);
bp_pack_value (bp, TYPE_READONLY (expr), 1);
+ unsigned vla_p;
+ if (in_lto_p)
+ vla_p = TYPE_LANG_FLAG_0 (TYPE_MAIN_VARIANT (expr));
+ else
+ vla_p = variably_modified_type_p (expr, NULL_TREE);
+ bp_pack_value (bp, vla_p, 1);
/* We used to stream TYPE_ALIAS_SET == 0 information to let frontends mark
types that are opaque for TBAA. This however did not work as intended,
because TYPE_ALIAS_SET == 0 was regularly lost in type merging. */