public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/40453] [F95] Enhanced (recursive) argument checking Date: Sat, 06 Oct 2012 14:40:00 -0000 [thread overview] Message-ID: <bug-40453-4-Z5bTMBN2v2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-40453-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40453 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Enhanced argument checking: |[F95] Enhanced (recursive) | |argument checking --- Comment #1 from janus at gcc dot gnu.org 2012-10-06 14:39:48 UTC --- (In reply to comment #0) > I think some other checks should still be added, e.g. > > a) PUREness check (see example below); passing/assigning > a pure to a non-pure dummy/proc-pointer is OK; doing vice versa > is not. > > [...] > > b) Similarly for ELEMENTAL. For proc-pointer assignments, use the > first example with PURE changed to ELEMENTAL. That non-intrinsic > elementals are not allowed as actual argument, is already checked > for (cf. C1228). Except of the remark in parentheses I could not > find in F2003/F2008 anything which prohibits ELEMENTAL for the > dummy argument; however, the parentheses is normative. Maybe one > should re-check the standard before adding an error check (see > example below). Both checks for PURE and ELEMENTAL have been implemented in r179080 for PR41733. > c) One needs to go recursively over the arguments as the second > example below shows. > > [...] > > program RecursiveInterface > interface > subroutine a(x) > real :: x > end subroutine a > subroutine b(a) > integer :: a > end subroutine b > subroutine c(f) > procedure(a) :: f > end subroutine c > subroutine d(f) > procedure(b) :: f > end subroutine d > subroutine e(f) > procedure(c) :: f > end subroutine e > end interface > call e(d) ! Argument (dummy subroutine) d has an integer argument > ! but e's f expects a real argument > end program RecursiveInterface In fact this is still accepted without error.
next parent reply other threads:[~2012-10-06 14:40 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-40453-4@http.gcc.gnu.org/bugzilla/> 2012-10-06 14:40 ` janus at gcc dot gnu.org [this message] 2012-10-06 14:44 ` janus at gcc dot gnu.org 2012-10-06 21:04 ` janus at gcc dot gnu.org 2012-10-06 21:49 ` janus at gcc dot gnu.org 2012-10-12 8:17 ` janus at gcc dot gnu.org 2012-10-12 8:21 ` janus at gcc dot gnu.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=bug-40453-4-Z5bTMBN2v2@http.gcc.gnu.org/bugzilla/ \ --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).