diff options
author | Andre Vehreschild <vehre@gcc.gnu.org> | 2020-08-13 16:06:31 +0200 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 15:08:10 -0300 |
commit | 5768e5ab166361cb504badd80927738824ecd171 (patch) | |
tree | 8c6fb6a6600143f0d503686caae1763b5bff6c81 /gcc/testsuite | |
parent | 818469e6eb520e9e8b66b617d72d3d11c741ec57 (diff) |
Fix PR fortran/93671; ICE in reffing coarray alloc. comps.
Fix an ICE when in a coarray an allocatable component had another allocatable
component.
gcc/fortran/ChangeLog:
2020-08-10 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/93671
* trans-array.c (structure_alloc_comps): Keep caf-mode when applying to
components; get the caf_token correctly for allocated scalar components.
gcc/testsuite/ChangeLog:
2020-08-10 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/93671
* gfortran.dg/coarray/pr93671.f90: New test.
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/gfortran.dg/coarray/pr93671.f90 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/coarray/pr93671.f90 b/gcc/testsuite/gfortran.dg/coarray/pr93671.f90 new file mode 100644 index 00000000000..8d26ff88753 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray/pr93671.f90 @@ -0,0 +1,24 @@ +! { dg-do run } + +! PR/fortran 93671 - ICE on intrinsic assignment to allocatable derived-type +! component of coarray + + type flux_planes + integer, allocatable :: normals + end type + + type package + type(flux_planes) surface_fluxes(1) + end type + + type(package) mail[*], halo_data + + halo_data%surface_fluxes(1)%normals = 1 + mail = halo_data + + if (any(size(mail%surface_fluxes) /= [1]) .OR. & + mail%surface_fluxes(1)%normals /= 1) then + stop 1 + end if +end + |