re PR target/79671 (mapnik miscompilation on armv7hl since r235622)
authorRichard Biener <rguenther@suse.de>
Wed, 12 Apr 2017 07:35:49 +0000 (07:35 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 12 Apr 2017 07:35:49 +0000 (07:35 +0000)
commit350792ffaed9b3506582b471bf133459d7ea64ab
treef06c2718f7e849e343f4476cdd4b96146c1d52d7
parentd62e6f1078dd62f6e8937d1f48f1f77f0a78e19e
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
16 files changed:
gcc/ChangeLog
gcc/alias.c
gcc/cp/ChangeLog
gcc/cp/tree.c
gcc/lto-streamer-out.c
gcc/lto/ChangeLog
gcc/lto/lto.c
gcc/stor-layout.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/pr79671_0.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lto/pr79671_1.c [new file with mode: 0644]
gcc/testsuite/g++.dg/torture/pr79671.C [new file with mode: 0644]
gcc/tree-core.h
gcc/tree-streamer-in.c
gcc/tree-streamer-out.c
gcc/tree.h