aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2024-05-17 15:19:26 +0100
committerPaul Thomas <pault@gcc.gnu.org>2024-05-17 15:19:26 +0100
commit5f5074fe7aaf9524defb265299a985eecba7f914 (patch)
treeec0756373bbfea1846b67a0c57c1488a3ef947b7 /libcpp
parent1accf4454a2ab57c4d681d1f6db332c46c61c058 (diff)
downloadgcc-5f5074fe7aaf9524defb265299a985eecba7f914.zip
gcc-5f5074fe7aaf9524defb265299a985eecba7f914.tar.gz
gcc-5f5074fe7aaf9524defb265299a985eecba7f914.tar.bz2
Fortran: Fix select type regression due to r14-9489 [PR114874]
2024-05-17 Paul Thomas <pault@gcc.gnu.org> gcc/fortran PR fortran/114874 * gfortran.h: Add 'assoc_name_inferred' to gfc_namespace. * match.cc (gfc_match_select_type): Set 'assoc_name_inferred' in select type namespace if the selector has inferred type. * primary.cc (gfc_match_varspec): If a select type temporary is apparently scalar and a left parenthesis has been detected, check the current namespace has 'assoc_name_inferred' set. If so, set inferred_type. * resolve.cc (resolve_variable): If the namespace of a select type temporary is marked with 'assoc_name_inferred' call gfc_fixup_inferred_type_refs to ensure references are OK. (gfc_fixup_inferred_type_refs): Catch invalid array refs.. gcc/testsuite/ PR fortran/114874 * gfortran.dg/pr114874_1.f90: New test for valid code. * gfortran.dg/pr114874_2.f90: New test for invalid code.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions