mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-05 20:01:28 +08:00
re PR fortran/91564 (ICE in gimplify_expr, at gimplify.c:14147)
2019-08-28 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91564 * check.c (gfc_check_kill_sub): Additional checks on status dummy argument. 2019-08-28 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91564 * gfortran.dg/pr91564.f90: New test. From-SVN: r275005
This commit is contained in:
parent
91eed5f281
commit
ab0f6d4c5f
@ -1,3 +1,9 @@
|
||||
2019-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/91564
|
||||
* check.c (gfc_check_kill_sub): Additional checks on status dummy
|
||||
argument.
|
||||
|
||||
2019-08-28 Mark Eggleston <mark.eggleston@codethink.com>
|
||||
|
||||
* intrinsics.text: Corrected stated standard for intrinsics
|
||||
|
@ -3301,6 +3301,22 @@ gfc_check_kill_sub (gfc_expr *pid, gfc_expr *sig, gfc_expr *status)
|
||||
|
||||
if (!scalar_check (status, 2))
|
||||
return false;
|
||||
|
||||
if (status->expr_type != EXPR_VARIABLE)
|
||||
{
|
||||
gfc_error ("STATUS at %L shall be an INTENT(OUT) variable",
|
||||
&status->where);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (status->expr_type == EXPR_VARIABLE
|
||||
&& status->symtree && status->symtree->n.sym
|
||||
&& status->symtree->n.sym->attr.intent == INTENT_IN)
|
||||
{
|
||||
gfc_error ("%qs at %L shall be an INTENT(OUT) variable",
|
||||
status->symtree->name, &status->where);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2019-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/91564
|
||||
* gfortran.dg/pr91564.f90: New test.
|
||||
|
||||
2019-08-28 Martin Sebor <msebor@redhat.com>
|
||||
|
||||
PR tree-optimization/91457
|
||||
|
16
gcc/testsuite/gfortran.dg/pr91564.f90
Normal file
16
gcc/testsuite/gfortran.dg/pr91564.f90
Normal file
@ -0,0 +1,16 @@
|
||||
! { dg-do compile }
|
||||
! PR fortran/91564
|
||||
! Contributed by Gerhard Steinmetz.
|
||||
program p
|
||||
integer i, j
|
||||
call kill (1, 2, 3) ! { dg-error "shall be an INTENT" }
|
||||
i = 42
|
||||
call bar(i, j)
|
||||
end
|
||||
|
||||
subroutine bar(n, m)
|
||||
integer, intent(in) :: n
|
||||
integer, intent(inout) :: m
|
||||
call kill (1, 3, n) ! { dg-error "shall be an INTENT" }
|
||||
call kill (1, 3, m)
|
||||
end subroutine bar
|
Loading…
x
Reference in New Issue
Block a user