https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100103
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:56275fd23e3f7876c24a812f9b6776b00a94744e commit r12-8803-g56275fd23e3f7876c24a812f9b6776b00a94744e Author: José Rui Faustino de Sousa <jrfso...@gmail.com> Date: Wed Sep 21 22:55:02 2022 +0200 Fortran: Fix automatic reallocation inside select rank [PR100103] gcc/fortran/ChangeLog: PR fortran/100103 * trans-array.cc (gfc_is_reallocatable_lhs): Add select rank temporary associate names as possible targets of automatic reallocation. gcc/testsuite/ChangeLog: PR fortran/100103 * gfortran.dg/PR100103.f90: New test. (cherry picked from commit 12b537b9b7fd50f4b2fbfcb7ccf45f8d66085577)