Commit 5e4bb241 by Harald Anlauf Committed by Harald Anlauf

re PR fortran/92898 (ICE in gfc_check_is_contiguous, at fortran/check.c:7157)

2019-12-12  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/92898
	* check.c (gfc_check_is_contiguous): Simplify check to handle
	arbitrary NULL() argument.

	PR fortran/92898
	* gfortran.dg/pr92898.f90: New test.

From-SVN: r279314
parent 666b46c6
2019-12-12 Harald Anlauf <anlauf@gmx.de>
PR fortran/92898
* check.c (gfc_check_is_contiguous): Simplify check to handle
arbitrary NULL() argument.
2019-12-11 Jakub Jelinek <jakub@redhat.com> 2019-12-11 Jakub Jelinek <jakub@redhat.com>
PR fortran/92899 PR fortran/92899
......
...@@ -7153,8 +7153,7 @@ gfc_check_ttynam_sub (gfc_expr *unit, gfc_expr *name) ...@@ -7153,8 +7153,7 @@ gfc_check_ttynam_sub (gfc_expr *unit, gfc_expr *name)
bool bool
gfc_check_is_contiguous (gfc_expr *array) gfc_check_is_contiguous (gfc_expr *array)
{ {
if (array->expr_type == EXPR_NULL if (array->expr_type == EXPR_NULL)
&& array->symtree->n.sym->attr.pointer == 1)
{ {
gfc_error ("Actual argument at %L of %qs intrinsic shall be an " gfc_error ("Actual argument at %L of %qs intrinsic shall be an "
"associated pointer", &array->where, gfc_current_intrinsic); "associated pointer", &array->where, gfc_current_intrinsic);
......
2019-12-12 Harald Anlauf <anlauf@gmx.de>
PR fortran/92898
* gfortran.dg/pr92898.f90: New test.
2019-12-12 Sudakshina Das <sudi.das@arm.com> 2019-12-12 Sudakshina Das <sudi.das@arm.com>
PR testsuite/92870 PR testsuite/92870
......
! { dg-do compile }
! PR fortran/92898
! Code contributed by Gerhard Steinmetz
program p
print *, is_contiguous (null()) ! { dg-error "shall be an associated" }
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment