From f4af4019dfb79f92adcf7cee4ef9e5f6ff428a37 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 24 Jun 2019 23:13:12 +0200 Subject: ipa-utils.h (type_with_linkage_p): Verify that type is CXX_ODR_P. * ipa-utils.h (type_with_linkage_p): Verify that type is CXX_ODR_P. (odr_type_p): Remove extra return. * lto-streamer-out.c (hash_tree): Hash TYPE_CXX_ODR_P; hash STRING_FLAG only for arrays and integers. * tree-stremaer-in.c (unpack_ts_type_common_value_fields): Update analogously. * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise. * print-tree.c (print_node): Print cxx-odr-p and string-flag. * tree.c (need_assembler_name_p): Also check that type is CXX_ODR_TYPE_P (verify_type_variant): Update verification of SRING_FLAG; also check CXX_ODR_P. * tree.h (ARRAY_OR_INTEGER_TYPE_CHECK): New macro. (TYPE_STRING_FLAG): Use it. (TYPE_CXX_ODR_P): New macro. * lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P; compare STRING_FLAG only for arrays and integers. * gcc-interface/decl.c (gnat_to_gnu_entity): Check that type is array or integer prior checking string flag. * gcc-interface/gigi.h (gnat_signed_type_for, maybe_character_value): Likewise. * c-common.c (braced_lists_to_strings): Check that type is array or integer prior checking string flag. * lex.c (cxx_make_type): Set TYPE_CXX_ODR_P. * dwarf2out.c (gen_array_type_die): First check that type is an array and then test string flag. * trans-expr.c (gfc_conv_substring): Check that type is array or integer prior checking string flag. (gfc_conv_string_parameter): Likewise. * trans-openmp.c (gfc_omp_scalar_p): Likewise. * trans.c (gfc_build_array_ref): Likewise. From-SVN: r272628 --- gcc/tree-streamer-out.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/tree-streamer-out.c') diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index b89cb65..a83057e 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -319,7 +319,6 @@ pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr) not necessary valid in a global context. Use the raw value previously set by layout_type. */ bp_pack_machine_mode (bp, TYPE_MODE_RAW (expr)); - bp_pack_value (bp, TYPE_STRING_FLAG (expr), 1); /* TYPE_NO_FORCE_BLK is private to stor-layout and need no streaming. */ bp_pack_value (bp, TYPE_PACKED (expr), 1); @@ -333,9 +332,12 @@ pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr) { bp_pack_value (bp, TYPE_TRANSPARENT_AGGR (expr), 1); bp_pack_value (bp, TYPE_FINAL_P (expr), 1); + bp_pack_value (bp, TYPE_CXX_ODR_P (expr), 1); } else if (TREE_CODE (expr) == ARRAY_TYPE) bp_pack_value (bp, TYPE_NONALIASED_COMPONENT (expr), 1); + if (TREE_CODE (expr) == ARRAY_TYPE || TREE_CODE (expr) == INTEGER_TYPE) + bp_pack_value (bp, TYPE_STRING_FLAG (expr), 1); if (AGGREGATE_TYPE_P (expr)) bp_pack_value (bp, TYPE_TYPELESS_STORAGE (expr), 1); bp_pack_value (bp, TYPE_EMPTY_P (expr), 1); -- cgit v1.1