aboutsummaryrefslogtreecommitdiff
path: root/gcc/coverage.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2025-05-14 12:08:24 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2025-05-20 16:49:39 +0200
commitc1db46f7e51d4a546ca536f7f10e548f02e5cc12 (patch)
tree2293b46068a2af1ca2dc2a73d7426405db9e75bd /gcc/coverage.c
parent76d16fbd802a10faabf63945dd34f351aea087dc (diff)
downloadgcc-c1db46f7e51d4a546ca536f7f10e548f02e5cc12.zip
gcc-c1db46f7e51d4a546ca536f7f10e548f02e5cc12.tar.gz
gcc-c1db46f7e51d4a546ca536f7f10e548f02e5cc12.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. (cherry picked from commit 9d039eff453f777c58642ff16178c1ce2a4be6ab)
Diffstat (limited to 'gcc/coverage.c')
0 files changed, 0 insertions, 0 deletions