https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119948
--- Comment #24 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Jerry DeLisle <jvdeli...@gcc.gnu.org>: https://gcc.gnu.org/g:8422524f6f43263caca2c2ab8a0e890e92f5f114 commit r15-9861-g8422524f6f43263caca2c2ab8a0e890e92f5f114 Author: Paul Thomas <pa...@gcc.gnu.org> Date: Thu May 1 15:22:54 2025 +0100 Fortran: Source allocation of pure function result rejected [PR119948] 2025-05-07 Paul Thomas <pa...@gcc.gnu.org> and Steven G. Kargl <ka...@gcc.gnu.org> gcc/fortran PR fortran/119948 * resolve.cc (gfc_impure_variable): The result of a module procedure with an interface declaration is not impure even if the current namespace is not the same as the symbol's. * primary.cc (match_variable): Module procedures with sym the same as result can be treated as variables, although marked external. gcc/testsuite/ PR fortran/119948 * gfortran.dg/pr119948.f90: New test. (cherry picked from commit 0abc77da9d704bba55a376bb5c162a54826ab94a)