https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104625
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Paul Thomas <pa...@gcc.gnu.org>: https://gcc.gnu.org/g:b038e202210eb3e982c2ec802438edd523b47a02 commit r14-4966-gb038e202210eb3e982c2ec802438edd523b47a02 Author: Paul Thomas <pa...@gcc.gnu.org> Date: Fri Oct 27 09:33:38 2023 +0100 Fortran: Fix some problems with SELECT TYPE selectors [PR104625]. 2023-10-27 Paul Thomas <pa...@gcc.gnu.org> gcc/fortran PR fortran/104625 * expr.cc (gfc_check_vardef_context): Check that the target does have a vector index before emitting the specific error. * match.cc (copy_ts_from_selector_to_associate): Ensure that class valued operator expressions set the selector rank and use the rank to provide the associate variable with an appropriate array spec. * resolve.cc (resolve_operator): Reduce stacked parentheses to a single pair. (fixup_array_ref): Extract selector symbol from parentheses. gcc/testsuite/ PR fortran/104625 * gfortran.dg/pr104625.f90: New test. * gfortran.dg/associate_55.f90: Change error check.