diff options
author | Harald Anlauf <anlauf@gmx.de> | 2022-09-21 19:55:30 +0200 |
---|---|---|
committer | Harald Anlauf <anlauf@gmx.de> | 2022-09-22 18:35:07 +0200 |
commit | bc71318a91286b5f00e88f07aab818ac82510692 (patch) | |
tree | a7c3e79815d38fabb45eb60f519207205275c9de /gcc/testsuite | |
parent | 3ad3f53bb3ce8b4d24f370528a5ed0b1ed34b883 (diff) | |
download | gcc-bc71318a91286b5f00e88f07aab818ac82510692.zip gcc-bc71318a91286b5f00e88f07aab818ac82510692.tar.gz gcc-bc71318a91286b5f00e88f07aab818ac82510692.tar.bz2 |
Fortran: fix ICE in generate_coarray_sym_init [PR82868]
gcc/fortran/ChangeLog:
PR fortran/82868
* trans-decl.cc (generate_coarray_sym_init): Skip symbol
if attr.associate_var.
gcc/testsuite/ChangeLog:
PR fortran/82868
* gfortran.dg/associate_26a.f90: New test.
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/gfortran.dg/associate_26a.f90 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/associate_26a.f90 b/gcc/testsuite/gfortran.dg/associate_26a.f90 new file mode 100644 index 0000000..85aebeb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/associate_26a.f90 @@ -0,0 +1,15 @@ +! { dg-do compile } +! { dg-options "-fcoarray=lib" } +! +! Test the fix for PR78152 and the followup in PR82868 +! +! Contributed by <physiker@toast2.net> +! +program co_assoc + implicit none + integer, parameter :: p = 5 + real, allocatable :: a(:,:)[:,:] + allocate (a(p,p)[2,*]) + associate (i => a(1:p, 1:p)) + end associate +end program co_assoc |