]> git.feebdaed.xyz Git - 0xmirror/gcc.git/commit
vartrack: fix skipping of unsuitable locs
authorAlexandre Oliva <oliva@adacore.com>
Thu, 18 Dec 2025 01:41:14 +0000 (22:41 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 18 Dec 2025 01:41:14 +0000 (22:41 -0300)
commit77ab3b07385f23b39a2445011068c04e0872b481
tree321b98bf79c958d995b27cd7c694c55e08e7a91c
parent78eca0d5c82fc5893a93bf276ca7142a0a8443ca
vartrack: fix skipping of unsuitable locs

When the last loc in a chain happens to be an unsuitable_loc(), we
record VAR_LOC_FROM as if the empty location had been derived from
that unsuitable loc, instead of leaving it empty, which ends up
preventing the VAR loc from being recomputed when other related locs
are usefully expanded.

Adjust the code that skips an unsuitable_loc() to take the same
preparation steps we take for exiting the loop as when an expansion
attempt yields NULL_RTX.

for  gcc/ChangeLog

* var-tracking.cc (vt_expand_var_loc_chain): Prepare to exit
the loop after unsuitable_loc.
gcc/var-tracking.cc