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/50541] gfortran should not accept a pointer as a generic-name   (r178939)
Date: Wed, 28 Sep 2011 11:52:00 -0000	[thread overview]
Message-ID: <bug-50541-4-raYarVH5Eh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50541-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50541

--- Comment #2 from janus at gcc dot gnu.org 2011-09-28 11:14:16 UTC ---
(In reply to comment #1)
> This one is trivial:

Unfortunately this causes one testsuite regression:

FAIL: gfortran.dg/func_derived_4.f90  -O0  (test for excess errors)


Reduced test case:


module class_field
  implicit none
  interface msh
    module procedure msh
  end interface
contains
  function msh()
    integer, pointer :: msh
  end function
end module


What is special about this, is that the generic and the specific procedure
share the same name. I think the problem is that we only have one symbol for
both, which triggers the conflict.

Possible solutions:
 * (quick'n'dirty) refine the check to only raise a conflict if there is no
specific procedure with the same name 
 * (cleaner but harder) introduce separate symbols for generics (in a separate
symtree), which might also solve our problems with 'constructors' (cf. PR
39427)

For specifics and generics with the same name, see also PR 42418.


  parent reply	other threads:[~2011-09-28 11:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 14:28 [Bug fortran/50541] New: " zeccav at gmail dot com
2011-09-27 18:24 ` [Bug fortran/50541] " janus at gcc dot gnu.org
2011-09-28 11:52 ` janus at gcc dot gnu.org [this message]
2011-09-28 15:17 ` burnus at gcc dot gnu.org
2013-04-16  8:53 ` zeccav at gmail dot com
2015-09-02 13:15 ` zeccav at gmail dot com
2021-02-27  9:56 ` zeccav at gmail dot com

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-50541-4-raYarVH5Eh@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: link
Be 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).