https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119139
--- Comment #5 from Iain Buclaw <ibuclaw at gcc dot gnu.org> --- Looking at where TREE_READONLY gets set in the front-end, it's likely introduced by PR110514. It does look as though the result variable incorrectly has `const` tagged against it though.