]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Invalid association with operator-result selector [PR123352]
authorPaul Thomas <pault@gcc.gnu.org>
Sat, 3 Jan 2026 07:37:28 +0000 (07:37 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sat, 3 Jan 2026 07:37:28 +0000 (07:37 +0000)
commit882d2e6c3584f6844359a50239813fb447dcb20e
treeb8347039b30e8c816a0bb33475625351a8b9328e
parente6c378fa5200cd8eb8b4356ef33e88fd13ee5436
Fortran:  Invalid association with operator-result selector [PR123352]

2026-01-03  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/123352
* gfortran.h: Add prototype for gfc_resolve_symbol.
* interface.cc (matching_typebound_op): If the current
namespace has not been resolved and the derived type is use
associated, resolve the derived type with gfc_resolve_symbol.
* match.cc (match_association_list): If the associate name is
unknown type and the selector is an operator expression, copy
the selector and call gfc_extend_expr. Replace the selector if
there is a match, otherwise free the copy.
* resolve.cc (gfc_resolve_symbol): New function.

gcc/testsuite/
PR fortran/123352
* gfortran.dg/associate_78.f90: New test.
gcc/fortran/gfortran.h
gcc/fortran/interface.cc
gcc/fortran/match.cc
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/associate_78.f90 [new file with mode: 0644]