https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77652
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:0110cfd5449bae3a772f45ea2e4c5dab5b7a8ccd commit r13-1904-g0110cfd5449bae3a772f45ea2e4c5dab5b7a8ccd Author: Harald Anlauf <anl...@gmx.de> Date: Wed Jul 27 21:34:22 2022 +0200 Fortran: fix invalid rank error in ASSOCIATED when rank is remapped [PR77652] gcc/fortran/ChangeLog: PR fortran/77652 * check.cc (gfc_check_associated): Make the rank check of POINTER vs. TARGET match the allowed forms of pointer assignment for the selected Fortran standard. gcc/testsuite/ChangeLog: PR fortran/77652 * gfortran.dg/associated_target_9a.f90: New test. * gfortran.dg/associated_target_9b.f90: New test.