Commit eaed3226 by Andre Vehreschild

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
parent 3603fa5c
2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org> 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 PR fortran/70696
* trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
is valid before accessing it. is valid before accessing it.
......
...@@ -9158,10 +9158,13 @@ resolve_lock_unlock_event (gfc_code *code) ...@@ -9158,10 +9158,13 @@ resolve_lock_unlock_event (gfc_code *code)
return; return;
/* Check for EVENT WAIT the UNTIL_COUNT. */ /* Check for EVENT WAIT the UNTIL_COUNT. */
if (code->op == EXEC_EVENT_WAIT && code->expr4 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 " if (!gfc_resolve_expr (code->expr4) || code->expr4->ts.type != BT_INTEGER
"expression", &code->expr4->where); || code->expr4->rank != 0)
gfc_error ("UNTIL_COUNT= argument at %L must be a scalar INTEGER "
"expression", &code->expr4->where);
}
} }
......
2017-01-13 Andre Vehreschild <vehre@gcc.gnu.org> 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 PR fortran/70696
* gfortran.dg/coarray/event_3.f08: New test. * gfortran.dg/coarray/event_3.f08: New test.
......
! { 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
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