2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/48876
* expr.c (gfc_simplify_expr): If end of a string is less
than zero, set it to zero.
2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/48876
* gfortran.dg/string_5.f90: New test.
From-SVN: r176961
+2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/48876
+ * expr.c (gfc_simplify_expr): If end of a string is less
+ than zero, set it to zero.
+
2011-07-28 Jakub Jelinek <jakub@redhat.com>
PR fortran/31067
if (p->ref && p->ref->u.ss.end)
gfc_extract_int (p->ref->u.ss.end, &end);
+ if (end < 0)
+ end = 0;
+
s = gfc_get_wide_string (end - start + 2);
memcpy (s, p->value.character.string + start,
(end - start) * sizeof (gfc_char_t));
+2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/48876
+ * gfortran.dg/string_5.f90: New test.
+
2011-07-29 Jason Merrill <jason@redhat.com>
PR c++/49867
--- /dev/null
+! { dg-do compile }
+! PR fortran/48876 - this used to segfault.
+! Test case contributed by mhp77 (a) gmx.at.
+program test
+ character :: string = "string"( : -1 )
+end program test
+