https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104965
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- In this case s.size() reads a local variable that can't be altered by new.
redi at gcc dot gnu.org via Gcc-bugs Thu, 17 Mar 2022 06:47:12 -0700
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104965
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- In this case s.size() reads a local variable that can't be altered by new.