http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50409

kargl at gcc dot gnu.org changed:

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

--- Comment #2 from kargl at gcc dot gnu.org 2011-09-15 18:05:11 UTC ---
I suspect that this chunk of code in gfc_simplify_expr
stating at line 1859 needs to special case zero-sized
strings:

      s = gfc_get_wide_string (end - start + 2);
      memcpy (s, p->value.character.string + start,
          (end - start) * sizeof (gfc_char_t));
      s[end - start + 1] = '\0';  /* TODO: C-style string.  */
      free (p->value.character.string);
      p->value.character.string = s;
      p->value.character.length = end - start;
      p->ts.u.cl = gfc_new_charlen (gfc_current_ns, NULL);
      p->ts.u.cl->length = gfc_get_int_expr (gfc_default_integer_kind,
                         NULL,
                         p->value.character.length);

Reply via email to