Prevent SRA from removing type changing assignment
authorMartin Jambor <mjambor@suse.cz>
Fri, 8 Dec 2017 12:11:02 +0000 (13:11 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Fri, 8 Dec 2017 12:11:02 +0000 (13:11 +0100)
commitd90ffcfb7d105d004cf04911a42935be03256b49
tree532b5384e1818d533de7ff602a79ef179ad6acd1
parent0123db8e39de9fdcb36e9a5ad26b3039474672bd
Prevent SRA from removing type changing assignment

2017-12-08  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/83141
* tree-sra.c (contains_vce_or_bfcref_p): Move up in the file, also
test for MEM_REFs implicitely changing types with padding.  Remove
inline keyword.
(build_accesses_from_assign): Added contains_vce_or_bfcref_p checks.

testsuite/
* gcc.dg/tree-ssa/pr83141.c: New test.
* gcc.dg/guality/pr54970.c: XFAIL tests querying a[0].

From-SVN: r255510
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/pr54970.c
gcc/testsuite/gcc.dg/tree-ssa/pr83141.c [new file with mode: 0644]
gcc/tree-sra.c