]> gcc.gnu.org Git - gcc.git/commit
ipa-sra: Avoid transitive splits with type mismatches (PR 96040)
authorMartin Jambor <mjambor@suse.cz>
Sat, 4 Jul 2020 17:46:52 +0000 (19:46 +0200)
committerMartin Jambor <mjambor@suse.cz>
Sat, 4 Jul 2020 17:46:52 +0000 (19:46 +0200)
commit56a34e3e1cbb7d3b2f9298c14d4d3a3a030c7755
tree244de030f54fe8d392f7c85183c7b8f25b914c61
parent2c10856d7401eb0f07121dd0c8dbbdf086b364f7
ipa-sra: Avoid transitive splits with type mismatches (PR 96040)

PR 96040 revealed IPA-SRA, when checking whether an intended split is
the same as the one in a called function does not also check if the
types match and the transformation code does not handle any resulting
type mismatches.  This patch simply avoids the the split in the case
of mismatches, so that we do not have to be careful about invalid
floating-point values being passed in floating point registers and
related issues.

gcc/ChangeLog:

2020-07-03  Martin Jambor  <mjambor@suse.cz>

PR ipa/96040
* ipa-sra.c (all_callee_accesses_present_p): Do not accept type
mismatched accesses.

gcc/testsuite/ChangeLog:

2020-07-03  Martin Jambor  <mjambor@suse.cz>

PR ipa/96040
* gcc.dg/ipa/pr96040.c: New test.

(cherry picked from commit b9a15a8325ba89b926e3c437b7961829a6b2fa2b)
gcc/ipa-sra.c
gcc/testsuite/gcc.dg/ipa/pr96040.c [new file with mode: 0644]
This page took 0.070122 seconds and 6 git commands to generate.