re PR fortran/91641 (ICE in gfc_conv_is_contiguous_expr, at fortran/trans-intrinsic.c:2857)
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91641 * check.c (gfc_check_is_contiguous): null() cannot be an actual argument to is_contiguous(). 2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91641 * gfortran.dg/pr91641.f90: New test. From-SVN: r276272
This commit is contained in:
parent
7a40dd5a26
commit
3262dde64c
@ -1,3 +1,9 @@
|
||||
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/91641
|
||||
* check.c (gfc_check_is_contiguous): null() cannot be an actual
|
||||
argument to is_contiguous().
|
||||
|
||||
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/91714
|
||||
|
@ -7098,6 +7098,14 @@ gfc_check_ttynam_sub (gfc_expr *unit, gfc_expr *name)
|
||||
bool
|
||||
gfc_check_is_contiguous (gfc_expr *array)
|
||||
{
|
||||
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 "
|
||||
"associated pointer", &array->where, gfc_current_intrinsic);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!array_check (array, 0))
|
||||
return false;
|
||||
|
||||
@ -7105,7 +7113,6 @@ gfc_check_is_contiguous (gfc_expr *array)
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool
|
||||
gfc_check_isatty (gfc_expr *unit)
|
||||
{
|
||||
|
@ -1,3 +1,8 @@
|
||||
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/91641
|
||||
* gfortran.dg/pr91641.f90: New test.
|
||||
|
||||
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/91714
|
||||
|
7
gcc/testsuite/gfortran.dg/pr91641.f90
Normal file
7
gcc/testsuite/gfortran.dg/pr91641.f90
Normal file
@ -0,0 +1,7 @@
|
||||
! { dg-do compile }
|
||||
! PR fortran/91641
|
||||
! Code conyributed by Gerhard Steinmetz
|
||||
program p
|
||||
real, pointer :: z(:)
|
||||
print *, is_contiguous (null(z)) ! { dg-error "shall be an associated" }
|
||||
end
|
Loading…
Reference in New Issue
Block a user