public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dominiq at lps dot ens dot fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/35152] Implicit procedure with keyword=argument is accepted Date: Thu, 20 Mar 2008 11:24:00 -0000 [thread overview] Message-ID: <20080320112406.8577.qmail@sourceware.org> (raw) In-Reply-To: <bug-35152-13404@http.gcc.gnu.org/bugzilla/> ------- Comment #4 from dominiq at lps dot ens dot fr 2008-03-20 11:24 ------- With this revision the following code gives an error: [ibook-dhum] f90/bug% cat rename_use_1.f90 ! { dg-do compile } module foo_base_mod type foo_dmt real(kind(1.d0)), allocatable :: rv(:) integer, allocatable :: iv1(:), iv2(:) end type foo_dmt type foo_zmt complex(kind(1.d0)), allocatable :: rv(:) integer, allocatable :: iv1(:), iv2(:) end type foo_zmt type foo_cdt integer, allocatable :: md(:) integer, allocatable :: hi(:), ei(:) end type foo_cdt end module foo_base_mod module bar_prt use foo_base_mod, only : foo_dmt, foo_zmt, foo_cdt type bar_dbprt type(foo_dmt), allocatable :: av(:) real(kind(1.d0)), allocatable :: d(:) type(foo_cdt) :: cd end type bar_dbprt type bar_dprt type(bar_dbprt), allocatable :: bpv(:) end type bar_dprt type bar_zbprt type(foo_zmt), allocatable :: av(:) complex(kind(1.d0)), allocatable :: d(:) type(foo_cdt) :: cd end type bar_zbprt type bar_zprt type(bar_zbprt), allocatable :: bpv(:) end type bar_zprt end module bar_prt module bar_pr_mod use bar_prt interface bar_pwrk subroutine bar_dppwrk(pr,x,y,cd,info,trans,work) use foo_base_mod use bar_prt type(foo_cdt),intent(in) :: cd type(bar_dprt), intent(in) :: pr real(kind(0.d0)),intent(inout) :: x(:), y(:) integer, intent(out) :: info character(len=1), optional :: trans real(kind(0.d0)),intent(inout), optional, target :: work(:) end subroutine bar_dppwrk subroutine bar_zppwrk(pr,x,y,cd,info,trans,work) use foo_base_mod use bar_prt type(foo_cdt),intent(in) :: cd type(bar_zprt), intent(in) :: pr complex(kind(0.d0)),intent(inout) :: x(:), y(:) integer, intent(out) :: info character(len=1), optional :: trans complex(kind(0.d0)),intent(inout), optional, target :: work(:) end subroutine bar_zppwrk end interface end module bar_pr_mod module foo_pr_mod use bar_prt, & & foo_dbprt => bar_dbprt,& & foo_zbprt => bar_zbprt,& & foo_dprt => bar_dprt,& & foo_zprt => bar_zprt use bar_pr_mod, & & foo_pwrk => bar_pwrk end module foo_pr_mod Subroutine foo_sub(a,pr,b,x,eps,cd,info) use foo_base_mod use foo_pr_mod Implicit None !!$ parameters Type(foo_dmt), Intent(in) :: a Type(foo_dprt), Intent(in) :: pr Type(foo_cdt), Intent(in) :: cd Real(Kind(1.d0)), Intent(in) :: b(:) Real(Kind(1.d0)), Intent(inout) :: x(:) Real(Kind(1.d0)), Intent(in) :: eps integer, intent(out) :: info !!$ Local data Real(Kind(1.d0)), allocatable, target :: aux(:),wwrk(:,:) Real(Kind(1.d0)), allocatable :: p(:), f(:) info = 0 Call bar_pwrk(pr,p,f,cd,info,work=aux) return End Subroutine foo_sub [ibook-dhum] f90/bug% gfc rename_use_1.f90 rename_use_1.f90:114.36: Call bar_pwrk(pr,p,f,cd,info,work=aux) 1 Error: Keyword argument requires explicit interface for procedure 'bar_pwrk' at (1) If 'Call bar_pwrk(pr,p,f,cd,info,work=aux)' is replaced by 'Call foo_pwrk(pr,p,f,cd,info,work=aux)' the error disappears. Note that I did not write the code, but only kept it and I don't know if the code is valid or not. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35152
next prev parent reply other threads:[~2008-03-20 11:24 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-02-10 8:36 [Bug fortran/35152] New: " burnus at gcc dot gnu dot org 2008-02-10 20:38 ` [Bug fortran/35152] " dfranke at gcc dot gnu dot org 2008-03-16 12:52 ` dfranke at gcc dot gnu dot org 2008-03-19 19:15 ` dfranke at gcc dot gnu dot org 2008-03-19 19:16 ` dfranke at gcc dot gnu dot org 2008-03-20 11:24 ` dominiq at lps dot ens dot fr [this message] 2008-03-20 12:15 ` dfranke at gcc dot gnu dot org 2008-03-20 12:17 ` burnus at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080320112406.8577.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).