https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96320
--- Comment #28 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:eaf883710c0039eca5caea5115e848adb4ab67bd commit r11-6832-geaf883710c0039eca5caea5115e848adb4ab67bd Author: Paul Thomas <pa...@gcc.gnu.org> Date: Thu Jan 21 10:00:00 2021 +0000 Fortran: This patch fixes comments 23 and 24 of PR96320. 2021-01-21 Paul Thomas <pa...@gcc.gnu.org> gcc/fortran PR fortran/96320 * decl.c (gfc_match_modproc): It is not an error to find a module procedure declaration within a contains block. * expr.c (gfc_check_vardef_context): Pure procedure result is assignable. Change 'own_scope' accordingly. * resolve.c (resolve_typebound_procedure): A procedure that has the module procedure attribute is almost certainly a module procedure, whatever its interface. gcc/testsuite/ PR fortran/96320 * gfortran.dg/module_procedure_5.f90 : New test. * gfortran.dg/module_procedure_6.f90 : New test.