https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94250
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to David Binderman from comment #4) > (In reply to Martin Liška from comment #3) > > A nice catch David! I've got a patch for it. > > Thanks. I should also perhaps mention that testsuite file > ./g++.dg/ipa/remref-2.C has the same problem. It would be > wise to ensure your patch fixes both. Yes, the patch covers both files. It's quite clear goes wrong there.