https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88486

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael at gcc dot gnu.org

--- Comment #10 from Mikael Morin <mikael at gcc dot gnu.org> ---
The assignment
  x = ['^' // x // '^']
is rewritten by the frontend passes to
  __var_1_realloc_string = ['^' // x // '^']
  x = __var_1_realloc_string
and the code generated for both assignments seems to be mostly good (albeit
very inefficient), except the length _x is not updated.

It seems gfc_conv_string_length changes the string length backend_decl of x
from *_x to a new variable (D.4740 with my out of date tree), so that the
reassignment code updates that variable instead of the original one _x.

Reply via email to