aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/fortran/ChangeLog4
-rw-r--r--gcc/fortran/match.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index adb8260..32586c5 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,9 @@
2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
+ * match.c (gfc_match_allocate): Check for NULL pointer.
+
+2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
+
* expr.c (gfc_check_pointer_assign): Fix typo in comment.
2018-01-08 Paul Thomas <pault@gcc.gnu.org>
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 5e313c4..320a0d8 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 "