diff options
author | Martin Jambor <mjambor@suse.cz> | 2025-05-14 12:08:24 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2025-05-14 12:08:28 +0200 |
commit | 9d039eff453f777c58642ff16178c1ce2a4be6ab (patch) | |
tree | d2c251ab89e053e666fa6fb735013039ba708341 /gcc/fortran/dump-parse-tree.cc | |
parent | d787bc4fd372298e9ed5b11cb3050fd3707070f6 (diff) | |
download | gcc-9d039eff453f777c58642ff16178c1ce2a4be6ab.zip gcc-9d039eff453f777c58642ff16178c1ce2a4be6ab.tar.gz gcc-9d039eff453f777c58642ff16178c1ce2a4be6ab.tar.bz2 |
tree-sra: Do not create stores into const aggregates (PR111873)
This patch fixes (hopefully the) one remaining place where gimple SRA
was still creating a load into const aggregates. It occurs when there
is a replacement for a load but that replacement is not type
compatible - typically because it is a single field structure.
I have used testcases from duplicates because the original test-case
no longer reproduces for me.
gcc/ChangeLog:
2025-05-13 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/111873
* tree-sra.cc (sra_modify_expr): When processing a load which has
a type-incompatible replacement, do not store the contents of the
replacement into the original aggregate when that aggregate is
const.
gcc/testsuite/ChangeLog:
2025-05-13 Martin Jambor <mjambor@suse.cz>
* gcc.dg/ipa/pr120044-1.c: New test.
* gcc.dg/ipa/pr120044-2.c: Likewise.
* gcc.dg/tree-ssa/pr114864.c: Likewise.
Diffstat (limited to 'gcc/fortran/dump-parse-tree.cc')
0 files changed, 0 insertions, 0 deletions