re PR fortran/70697 ([Coarray] ICE on EVENT WAIT with array element UNTIL_COUNT argument)
gcc/testsuite/ChangeLog: 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org> PR fortran/70697 * gfortran.dg/coarray/event_4.f08: New test. gcc/fortran/ChangeLog: 2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org> PR fortran/70697 * resolve.c (resolve_lock_unlock_event): Resolve the expression for event's until_count. From-SVN: r244413
This commit is contained in:
parent
3603fa5cfb
commit
eaed322611
@ -1,3 +1,9 @@
|
||||
2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
|
||||
|
||||
PR fortran/70697
|
||||
* resolve.c (resolve_lock_unlock_event): Resolve the expression for
|
||||
event's until_count.
|
||||
|
||||
2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
|
||||
|
||||
PR fortran/70696
|
||||
|
@ -9158,10 +9158,13 @@ resolve_lock_unlock_event (gfc_code *code)
|
||||
return;
|
||||
|
||||
/* Check for EVENT WAIT the UNTIL_COUNT. */
|
||||
if (code->op == EXEC_EVENT_WAIT && code->expr4
|
||||
&& (code->expr4->ts.type != BT_INTEGER || code->expr4->rank != 0))
|
||||
gfc_error ("UNTIL_COUNT= argument at %L must be a scalar INTEGER "
|
||||
"expression", &code->expr4->where);
|
||||
if (code->op == EXEC_EVENT_WAIT && code->expr4)
|
||||
{
|
||||
if (!gfc_resolve_expr (code->expr4) || code->expr4->ts.type != BT_INTEGER
|
||||
|| code->expr4->rank != 0)
|
||||
gfc_error ("UNTIL_COUNT= argument at %L must be a scalar INTEGER "
|
||||
"expression", &code->expr4->where);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
|
||||
|
||||
PR fortran/70697
|
||||
* gfortran.dg/coarray/event_4.f08: New test.
|
||||
|
||||
2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org>
|
||||
|
||||
PR fortran/70696
|
||||
|
12
gcc/testsuite/gfortran.dg/coarray/event_4.f08
Normal file
12
gcc/testsuite/gfortran.dg/coarray/event_4.f08
Normal file
@ -0,0 +1,12 @@
|
||||
! { dg-do run }
|
||||
!
|
||||
! Check that pr 70697 is fixed.
|
||||
|
||||
program event_4
|
||||
use iso_fortran_env
|
||||
integer :: nc(1)
|
||||
type(event_type) done[*]
|
||||
nc(1) = 1
|
||||
event post(done[1])
|
||||
event wait(done,until_count=nc(1))
|
||||
end
|
Loading…
Reference in New Issue
Block a user