openmp.c (gfc_match_oacc_wait): Don't restrict wait directive arguments to constant integers.
gcc/fortran/ * openmp.c (gfc_match_oacc_wait): Don't restrict wait directive arguments to constant integers. gcc/testsuite/ * gfortran.dg/goacc/wait.f90: New test. From-SVN: r253071
This commit is contained in:
parent
edabe3d8b4
commit
a0e27dc2aa
4 changed files with 22 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
* openmp.c (gfc_match_oacc_wait): Don't restrict wait directive
|
||||
arguments to constant integers.
|
||||
|
||||
2017-09-17 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/82173
|
||||
|
|
|
@ -2185,8 +2185,7 @@ gfc_match_oacc_wait (void)
|
|||
}
|
||||
|
||||
if (!gfc_resolve_expr (el->expr)
|
||||
|| el->expr->ts.type != BT_INTEGER || el->expr->rank != 0
|
||||
|| el->expr->expr_type != EXPR_CONSTANT)
|
||||
|| el->expr->ts.type != BT_INTEGER || el->expr->rank != 0)
|
||||
{
|
||||
gfc_error ("WAIT clause at %L requires a scalar INTEGER expression",
|
||||
&el->expr->where);
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
* gfortran.dg/goacc/wait.f90: New test.
|
||||
|
||||
2017-09-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR sanitizer/81715
|
||||
|
|
12
gcc/testsuite/gfortran.dg/goacc/wait.f90
Normal file
12
gcc/testsuite/gfortran.dg/goacc/wait.f90
Normal file
|
@ -0,0 +1,12 @@
|
|||
! Ensure that ACC WAIT accept integer arguments.
|
||||
|
||||
subroutine foo (wqueue)
|
||||
implicit none
|
||||
integer :: wqueue, waitno
|
||||
integer, parameter :: waitp = 100
|
||||
|
||||
!$acc wait (wqueue)
|
||||
!$acc wait (waitno)
|
||||
!$acc wait (waitp)
|
||||
!$acc wait (0)
|
||||
end subroutine foo
|
Loading…
Add table
Reference in a new issue