Commit 627d59b6 by Tobias Burnus

[Fortran] avoid ICE in gfc_omp_check_optional_argument (PR93464)

        PR fortran/93464
        * openmp.c (gfc_omp_check_optional_argument): Avoid ICE when
        DECL_LANG_SPECIFIC and GFC_DESCRIPTOR_TYPE_P but not
        GFC_DECL_SAVED_DESCRIPTOR as for local allocatable character vars.

        PR fortran/93464
        * gfortran.dg/goacc/pr93464.f90: New.
parent 1ee3b380
2020-01-28 Tobias Burnus <tobias@codesourcery.com> 2020-01-28 Tobias Burnus <tobias@codesourcery.com>
PR fortran/93464
* openmp.c (gfc_omp_check_optional_argument): Avoid ICE when
DECL_LANG_SPECIFIC and GFC_DESCRIPTOR_TYPE_P but not
GFC_DECL_SAVED_DESCRIPTOR as for local allocatable character vars.
2020-01-28 Tobias Burnus <tobias@codesourcery.com>
* gfortran.texi (Runtime): Remove tailing '.' in @menu. * gfortran.texi (Runtime): Remove tailing '.' in @menu.
2020-01-27 Tobias Burnus <tobias@codesourcery.com> 2020-01-27 Tobias Burnus <tobias@codesourcery.com>
......
...@@ -101,7 +101,8 @@ gfc_omp_check_optional_argument (tree decl, bool for_present_check) ...@@ -101,7 +101,8 @@ gfc_omp_check_optional_argument (tree decl, bool for_present_check)
decl = GFC_DECL_SAVED_DESCRIPTOR (decl); decl = GFC_DECL_SAVED_DESCRIPTOR (decl);
} }
if (TREE_CODE (decl) != PARM_DECL if (decl == NULL_TREE
|| TREE_CODE (decl) != PARM_DECL
|| !DECL_LANG_SPECIFIC (decl) || !DECL_LANG_SPECIFIC (decl)
|| !GFC_DECL_OPTIONAL_ARGUMENT (decl)) || !GFC_DECL_OPTIONAL_ARGUMENT (decl))
return NULL_TREE; return NULL_TREE;
......
2020-01-28 Tobias Burnus <tobias@codesourcery.com>
PR fortran/93464
* gfortran.dg/goacc/pr93464.f90: New.
2020-01-28 Richard Sandiford <richard.sandiford@arm.com> 2020-01-28 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/93434 PR tree-optimization/93434
......
! { dg-do compile }
!
! PR fortran/93464
!
! Contributed by G. Steinmetz
!
program p
character :: c(2) = 'a'
character, allocatable :: z(:)
!$acc parallel
!$omp target
z = c
!$acc end parallel
!$omp end target
print *, z
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