https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83113
--- Comment #9 from Andrew Benson <abensonca at gmail dot com> --- Note that this patch doesn't check that the duplicate attributes are valid or consistent with those declared in the module. For example both: module mm implicit none interface module function c() integer, dimension(2) :: c end function c end interface end module mm submodule (mm) oo implicit none contains module function c() integer, dimension(3) :: c end function c end submodule oo and module mm implicit none interface module function c() integer, dimension(2) :: c end function c end interface end module mm submodule (mm) oo implicit none contains module function c() integer, dimension(:) :: c end function c end submodule oo compile successfully, but should be rejected. Presumably we should add some check that the attributes of the declaration in the submodule match those in the module.