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/60507] Passing function call into procedure argument not caught Date: Wed, 12 Mar 2014 16:46:00 -0000 [thread overview] Message-ID: <bug-60507-4-OGKNRSg3Fn@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-60507-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60507 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |janus at gcc dot gnu.org Summary|Passing real expression |Passing function call into |into procedure argument not |procedure argument not |caught |caught --- Comment #2 from janus at gcc dot gnu.org --- This helps (not regtested yet): Index: gcc/fortran/interface.c =================================================================== --- gcc/fortran/interface.c (revision 208455) +++ gcc/fortran/interface.c (working copy) @@ -2741,7 +2741,12 @@ compare_actual_formal (gfc_actual_arglist **ap, gf /* Satisfy F03:12.4.1.3 by ensuring that a procedure actual argument is provided for a procedure formal argument. */ if (f->sym->attr.flavor == FL_PROCEDURE - && gfc_expr_attr (a->expr).flavor != FL_PROCEDURE) + && !((a->expr->expr_type == EXPR_VARIABLE + && (a->expr->symtree->n.sym->attr.flavor == FL_PROCEDURE + || a->expr->symtree->n.sym->attr.proc_pointer)) + || (a->expr->expr_type == EXPR_FUNCTION + && a->expr->symtree->n.sym->result->attr.proc_pointer) + || gfc_is_proc_ptr_comp (a->expr))) { if (where) gfc_error ("Expected a procedure for argument '%s' at %L",
next prev parent reply other threads:[~2014-03-12 16:46 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-03-12 8:52 [Bug fortran/60507] New: Passing real expression " vladimir.fuka at gmail dot com 2014-03-12 13:47 ` [Bug fortran/60507] " janus at gcc dot gnu.org 2014-03-12 16:46 ` janus at gcc dot gnu.org [this message] 2014-03-13 20:12 ` [Bug fortran/60507] Passing function call " janus at gcc dot gnu.org 2014-03-18 15:33 ` janus at gcc dot gnu.org 2014-12-26 13:42 ` dominiq at lps dot ens.fr 2014-12-29 12:12 ` janus at gcc dot gnu.org 2015-01-02 11:25 ` 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-60507-4-OGKNRSg3Fn@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).