aboutsummaryrefslogtreecommitdiff
path: root/libatomic/config/posix/host-config.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2025-02-21 09:58:04 +0100
committerRichard Biener <rguenth@gcc.gnu.org>2025-02-21 13:05:13 +0100
commitee30e2586a3142e63daaf301a561984f1d22d38d (patch)
treeef6b94c08353f1e8a6fb4a839f6d092020c0b5f7 /libatomic/config/posix/host-config.h
parentd2720051c419a781a2f04daadcbefc99fa77b051 (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
tree-optimization/118954 - avoid UB on ref created by predcomHEADtrunkmaster
When predicitive commoning moves an invariant ref it makes sure to not build a MEM_REF with a base that is negatively offsetted from an object. But in trying to preserve some transforms it does not consider association of a constant offset with the address computation in DR_BASE_ADDRESS leading to exactly this problem again. This is arguably a problem in data-ref analysis producing such an out-of-bound DR_BASE_ADDRESS, but this looks quite involved to fix, so the following avoids the association in one more case. This fixes the testcase while preserving the desired transform in gcc.dg/tree-ssa/predcom-1.c. PR tree-optimization/118954 * tree-predcom.cc (ref_at_iteration): Make sure to not associate the constant offset with DR_BASE_ADDRESS when that is an offsetted pointer. * gcc.dg/torture/pr118954.c: New testcase.
Diffstat (limited to 'libatomic/config/posix/host-config.h')
0 files changed, 0 insertions, 0 deletions