https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126234
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Jerry DeLisle <[email protected]>: https://gcc.gnu.org/g:b02b1bb88c08588f10051aee509c026212b29821 commit r16-9277-gb02b1bb88c08588f10051aee509c026212b29821 Author: Jerry DeLisle <[email protected]> Date: Mon Jul 13 11:26:13 2026 -0700 fortran: [PR126234] Fix regression in SPEC benchmarks. The fix for pr126170 broke one of the SPEC tests. The orginal fix used gfc_find_symbol which had a side effect of causing the error. The gfc_find_symbol calls gfc_find_sym_tree which then calls ambiguous_symbol where the error is issued. PR fortran/126234 gcc/fortran/ChangeLog: * module.cc (read_module): Walk the symtree instead of using gfc_find_symbol. gcc/testsuite/ChangeLog: * gfortran.dg/pr126234.f90: New test. (cherry picked from commit 3a92ef9f6e91b5493838feee44ba1f01065b119a)
