diff options
Diffstat (limited to 'gcc/tree-streamer-out.c')
-rw-r--r-- | gcc/tree-streamer-out.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index d0b7f6d..ab9b747 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -313,6 +313,17 @@ pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr) /* TYPE_NO_FORCE_BLK is private to stor-layout and need no streaming. */ bp_pack_value (bp, TYPE_NEEDS_CONSTRUCTING (expr), 1); + bp_pack_value (bp, TYPE_PACKED (expr), 1); + 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); + /* Make sure to preserve the fact whether the frontend would assign + alias-set zero to this type. Do that only for main variants, because + type variants alias sets are never computed. + FIXME: This does not work for pre-streamed builtin types. */ + bp_pack_value (bp, (TYPE_ALIAS_SET (expr) == 0 + || (!in_lto_p && TYPE_MAIN_VARIANT (expr) == expr + && get_alias_set (expr) == 0)), 1); if (RECORD_OR_UNION_TYPE_P (expr)) { bp_pack_value (bp, TYPE_TRANSPARENT_AGGR (expr), 1); @@ -320,17 +331,8 @@ pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr) } else if (TREE_CODE (expr) == ARRAY_TYPE) bp_pack_value (bp, TYPE_NONALIASED_COMPONENT (expr), 1); - bp_pack_value (bp, TYPE_PACKED (expr), 1); - 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); bp_pack_var_len_unsigned (bp, TYPE_PRECISION (expr)); bp_pack_var_len_unsigned (bp, TYPE_ALIGN (expr)); - /* Make sure to preserve the fact whether the frontend would assign - alias-set zero to this type. */ - bp_pack_var_len_int (bp, (TYPE_ALIAS_SET (expr) == 0 - || (!in_lto_p - && get_alias_set (expr) == 0)) ? 0 : -1); } |