https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77903

--- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 40237
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40237&action=edit
Fix for the PR

This is still a bit rough round the edges but it fixes the PR, regtests and
bootstraps with this testcase:

! { dg-do compile }
!
! Test the fix for PR77903
!
! Contributed by Damian Rouson  <dam...@sourceryinstitute.org>
!
module one_module
  implicit none
  interface
    module function one()
    end function
    integer module function two()
    end function
  end interface
end module

submodule(one_module) one_submodule
  implicit none
contains
  integer module function one()  ! { dg-error "Type mismatch" }
    one = 1
  end function
  integer(8) module function two()  ! { dg-error "Type mismatch" }
    two = 2
  end function
end submodule

I am back in France tomorrow night and will tidy up and submit on Monday.

Cheers

Paul

Reply via email to