From: Steven G. Kargl Date: Tue, 9 Jan 2018 01:17:50 +0000 (+0000) Subject: match.c (gfc_match_allocate): Check for NULL pointer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8799df67f2dab88f9fda11739c501780a85575e2;p=gcc.git match.c (gfc_match_allocate): Check for NULL pointer. 2018-01-08 Steven G. Kargl * match.c (gfc_match_allocate): Check for NULL pointer. From-SVN: r256364 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index adb82609d9d..32586c509f9 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2018-01-08 Steven G. Kargl + + * match.c (gfc_match_allocate): Check for NULL pointer. + 2018-01-08 Steven G. Kargl * expr.c (gfc_check_pointer_assign): Fix typo in comment. diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 5e313c41fcf..320a0d8af55 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -4071,7 +4071,7 @@ gfc_match_allocate (void) for which the corresponding type parameter is assumed. */ if (saw_assumed && (tail->expr->ts.deferred - || tail->expr->ts.u.cl->length + || (tail->expr->ts.u.cl && tail->expr->ts.u.cl->length) || tail->expr->symtree->n.sym->attr.dummy == 0)) { gfc_error ("Incompatible allocate-object at %C for CHARACTER "