match.c (gfc_match_allocate): Check for NULL pointer.

2018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>

	* match.c (gfc_match_allocate): Check for NULL pointer.

From-SVN: r256364
This commit is contained in:
Steven G. Kargl 2018-01-09 01:17:50 +00:00
parent c8a0c7b660
commit 8799df67f2
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
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.

View File

@ -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 "