2015-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/67526
* gfortran.dg/pr67526.f90: New test.
2015-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/67526
* expr.c (gfc_check_init_expr): Do not dereference a NULL pointer.
From-SVN: r227651
+2015-09-10 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/67526
+ * expr.c (gfc_check_init_expr): Do not dereference a NULL pointer.
+
2015-09-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/66993
break;
case EXPR_SUBSTRING:
- t = gfc_check_init_expr (e->ref->u.ss.start);
- if (!t)
- break;
-
- t = gfc_check_init_expr (e->ref->u.ss.end);
- if (t)
- t = gfc_simplify_expr (e, 0);
+ if (e->ref)
+ {
+ t = gfc_check_init_expr (e->ref->u.ss.start);
+ if (!t)
+ break;
+ t = gfc_check_init_expr (e->ref->u.ss.end);
+ if (t)
+ t = gfc_simplify_expr (e, 0);
+ }
+ else
+ t = false;
break;
case EXPR_STRUCTURE:
+2015-09-10 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/67526
+ * gfortran.dg/pr67526.f90: New test.
+
2015-09-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/67318
--- /dev/null
+! { dg-do compile }
+! Original code from gerhard dot steinmetz dot fortran at t-online dot de
+! PR fortran/67526
+program p
+ character :: c1 = 'abc'(: ! { dg-error "error in SUBSTRING" }
+ character :: c2 = 'abc'(3: ! { dg-error "error in SUBSTRING" }
+ character :: c3 = 'abc'(:1 ! { dg-error "error in SUBSTRING" }
+ character :: c4 = 'abc'(2:2 ! { dg-error "error in SUBSTRING" }
+end