public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47710] New: [OOP] Improve ambiguity check for TBP
@ 2011-02-12  9:32 burnus at gcc dot gnu.org
  2011-02-12 10:05 ` [Bug fortran/47710] " burnus at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-12  9:32 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [OOP] Improve ambiguity check for TBP
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: janus@gcc.gnu.org


http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/9a2837d8aee4e38c

There is potentially a problem with the ambiguity check for TBP of the form

  procedure, nopass :: baseproc_nopass => baseproc
  procedure, pass   :: baseproc_pass => baseproc 

That is: Both TBP point to the same procedure, though through the PASS and
NOPASS they should be distinguishable.

It is a bit unclear whether this is valid - also Richard Maine is confused ;-)
One might want to ask at J3 - maybe up to an interpretation request.

  * * *

Janus' example (cf. also below) should be truly ambiguous:

module mod

  type base_t
  contains
    procedure, nopass :: baseproc_nopass => baseproc1
    procedure, pass   :: baseproc_pass => baseproc2
    generic           :: some_proc => baseproc_pass, baseproc_nopass
  end type

contains

  subroutine baseproc1 (this)
    class(base_t) :: this
    print *, 'baseproc1'
  end subroutine

  subroutine baseproc2 (this,that)
    class(base_t) :: this, that
    print *, 'baseproc2'
  end subroutine

end module

program p
  use mod
  type(base_t) :: t

  call t%some_proc(t)  ! ambiguous!!!
end program


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-06-22 21:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-12  9:32 [Bug fortran/47710] New: [OOP] Improve ambiguity check for TBP burnus at gcc dot gnu.org
2011-02-12 10:05 ` [Bug fortran/47710] " burnus at gcc dot gnu.org
2011-09-10  8:48 ` [Bug fortran/47710] [OOP] Improve ambiguity check for GENERIC TBP w/ PASS and NOPASS janus at gcc dot gnu.org
2011-09-10  9:45 ` janus at gcc dot gnu.org
2012-06-17 17:47 ` janus at gcc dot gnu.org
2012-06-17 21:28 ` janus at gcc dot gnu.org
2012-06-22 21:06 ` janus at gcc dot gnu.org
2012-06-22 21:17 ` janus at gcc dot gnu.org

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).