https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71156
--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> --- (In reply to Dominique d'Humieres from comment #5) > With the patch in comment 3, compiling the test > > module my_interface > implicit none > interface > module subroutine f > end subroutine > end interface > end module > > submodule(my_interface) my_implementation > implicit none > contains > elemental module subroutine f > end subroutine > end submodule > > gives the misleading error > > elemental module subroutine f > 1 > Error: Mismatch in PURE attribute between MODULE PROCEDURE at (1) and its > interface in my_interface Yes, I noticed that. It comes about because the test for PURE and ELEMENTAL are the wrong way round in the existing code. ELEMENTAL procedures automatically receive the PURE attribute so the order matters. I did not change this in the draft patch because I was in a hurry and didn't want to break anything that might depend on this error. I will tackle this PR properly tonight. Cheers Paul