public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mikael at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/39290] Subroutine/function ambiguity in generics Date: Mon, 29 Apr 2013 10:59:00 -0000 [thread overview] Message-ID: <bug-39290-4-Ha4Gb03uFg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-39290-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39290 --- Comment #8 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-29 10:59:51 UTC --- The following excerpt from gfc_compare_interfaces(interface.c) seems to be the cause of 'qc' being called: if (s1->attr.function && s2->attr.function) { /* If both are functions, check result characteristics. */ if (!check_result_characteristics (s1, s2, errmsg, err_len)) return 0; } s2 is 'ff', and s2->attr.function is false, so we don't check function results, and the 'qc' interface matches. There are a quite a few problems it seems: 1. we rely on s1->attr.function _and_ s2->attr.function being set, which is obviously not the case with implicit typing. 2. check_result_characteristics will call gfc_compare_types, so it needs properly set types (no BT_UNKNOWN). 3. gfc_search_interface returns the first match, so it doesn't detect multiple matches (which would reject this case and avoid generating wrong code here). 4. Implicit typing depends on how the symbol is used, so basically on the available interfaces, but that itself needs implicit typing being resolved (see 1. and 2.) Good luck to whoever wants to fix this.
next prev parent reply other threads:[~2013-04-29 10:59 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-39290-4@http.gcc.gnu.org/bugzilla/> 2012-08-12 11:27 ` mikael at gcc dot gnu.org 2012-08-12 13:01 ` burnus at gcc dot gnu.org 2012-08-18 21:56 ` mikael at gcc dot gnu.org 2012-08-18 22:00 ` mikael at gcc dot gnu.org 2013-04-28 18:35 ` janus at gcc dot gnu.org 2013-04-29 9:31 ` burnus at gcc dot gnu.org 2013-04-29 10:59 ` mikael at gcc dot gnu.org [this message] 2013-04-29 12:40 ` burnus at gcc dot gnu.org 2013-04-29 14:53 ` janus at gcc dot gnu.org 2013-07-16 6:17 ` burnus at gcc dot gnu.org 2009-02-24 14:35 [Bug fortran/39290] New: " burnus at gcc dot gnu dot org 2009-02-26 12:27 ` [Bug fortran/39290] " pault 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=bug-39290-4-Ha4Gb03uFg@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).