aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-04-12 07:35:49 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-04-12 07:35:49 +0000
commit350792ffaed9b3506582b471bf133459d7ea64ab (patch)
treef06c2718f7e849e343f4476cdd4b96146c1d52d7 /gcc/lto-streamer-out.c
parentd62e6f1078dd62f6e8937d1f48f1f77f0a78e19e (diff)
downloadgcc-350792ffaed9b3506582b471bf133459d7ea64ab.zip
gcc-350792ffaed9b3506582b471bf133459d7ea64ab.tar.gz
gcc-350792ffaed9b3506582b471bf133459d7ea64ab.tar.bz2
re PR target/79671 (mapnik miscompilation on armv7hl since r235622)
2017-04-12 Richard Biener <rguenther@suse.de> Bernd Edlinger <bernd.edlinger@hotmail.de> PR middle-end/79671 * alias.c (component_uses_parent_alias_set_from): Handle TYPE_TYPELESS_STORAGE. (get_alias_set): Likewise. * tree-core.h (tree_type_common): Add typeless_storage flag. * tree.h (TYPE_TYPELESS_STORAGE): New macro. * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE for types containing members with TYPE_TYPELESS_STORAGE. (place_field): Likewise. (layout_type): Likewise for ARRAY_TYPE. * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE. * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream TYPE_TYPELESS_STORAGE. * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise. lto/ * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE. cp/ * tree.c (build_cplus_array_type): Set TYPE_TYPELESS_STORAGE for arrays of character or std::byte type. * g++.dg/torture/pr79671.C: New testcase. * g++.dg/lto/pr79671_0.C: Likewise. * g++.dg/lto/pr79671_1.c: Likewise. Co-Authored-By: Bernd Edlinger <bernd.edlinger@hotmail.de> From-SVN: r246866
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 82a0cd6..b96b9df 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -1143,6 +1143,8 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map<tree, hashval_t> *map,
}
else if (code == ARRAY_TYPE)
hstate.add_flag (TYPE_NONALIASED_COMPONENT (t));
+ if (AGGREGATE_TYPE_P (t))
+ hstate.add_flag (TYPE_TYPELESS_STORAGE (t));
hstate.commit_flag ();
hstate.add_int (TYPE_PRECISION (t));
hstate.add_int (TYPE_ALIGN (t));