re PR fortran/85703 ([openacc] ICE in resolve_fntype, at fortran/resolve.c:16313)
PR fortran/85703 gcc/fortran/ * parse.c (decode_oacc_directive): Set gfc_matching_function to false. (decode_omp_directive): Likewise. gcc/testsuite/ * gfortran.dg/goacc/pr85703.f90: New test. * gfortran.dg/gomp/pr85703.f90: New test. From-SVN: r261551
This commit is contained in:
parent
adc41ebeab
commit
0be606d3ce
5 changed files with 34 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
PR fortran/85703
|
||||
* parse.c (decode_oacc_directive): Set gfc_matching_function
|
||||
to false.
|
||||
(decode_omp_directive): Likewise.
|
||||
|
||||
2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
PR fortran/85702
|
||||
|
|
|
@ -624,6 +624,8 @@ decode_oacc_directive (void)
|
|||
gfc_clear_error (); /* Clear any pending errors. */
|
||||
gfc_clear_warning (); /* Clear any pending warnings. */
|
||||
|
||||
gfc_matching_function = false;
|
||||
|
||||
if (gfc_pure (NULL))
|
||||
{
|
||||
gfc_error_now ("OpenACC directives at %C may not appear in PURE "
|
||||
|
@ -795,6 +797,8 @@ decode_omp_directive (void)
|
|||
gfc_clear_error (); /* Clear any pending errors. */
|
||||
gfc_clear_warning (); /* Clear any pending warnings. */
|
||||
|
||||
gfc_matching_function = false;
|
||||
|
||||
if (gfc_current_state () == COMP_FUNCTION
|
||||
&& gfc_current_block ()->result->ts.kind == -1)
|
||||
spec_only = true;
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
PR fortran/85703
|
||||
* gfortran.dg/goacc/pr85703.f90: New test.
|
||||
* gfortran.dg/gomp/pr85703.f90: New test.
|
||||
|
||||
2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
PR fortran/85702
|
||||
|
|
9
gcc/testsuite/gfortran.dg/goacc/pr85703.f90
Normal file
9
gcc/testsuite/gfortran.dg/goacc/pr85703.f90
Normal file
|
@ -0,0 +1,9 @@
|
|||
! PR fortran/85703
|
||||
! { dg-do compile }
|
||||
|
||||
character function f()
|
||||
!$acc parallel loop reduction(+:a)
|
||||
do i = 1, 4
|
||||
end do
|
||||
!$acc end parallel loop
|
||||
end
|
8
gcc/testsuite/gfortran.dg/gomp/pr85703.f90
Normal file
8
gcc/testsuite/gfortran.dg/gomp/pr85703.f90
Normal file
|
@ -0,0 +1,8 @@
|
|||
! PR fortran/85703
|
||||
! { dg-do compile }
|
||||
|
||||
character function f()
|
||||
!$omp single
|
||||
!$omp end single
|
||||
f = 'a'
|
||||
end
|
Loading…
Add table
Reference in a new issue