We have this (rare?) wrong code bug https://gcc.gnu.org/PR101188
which Jeff fixed for v14: https://gcc.gnu.org/r14-1738 The fix doesn't fit 100% for v13 but the PR has a backport for v13 in comment #16. Would be great if this could be part of v13.3, but I don't have the resources to reg-test it on all the targets. Johann