This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43945] [OOP] Derived type with GENERIC: resolved to the wrong specific TBP
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Apr 2010 14:33:13 -0000
- Subject: [Bug fortran/43945] [OOP] Derived type with GENERIC: resolved to the wrong specific TBP
- References: <bug-43945-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pault at gcc dot gnu dot org 2010-04-30 14:33 -------
(In reply to comment #0)
> Another OOP problem found by Salvatore.
>
> Jim Xia confirms that NAG f95 gives the correct result, cf.
> http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/e18d0434c46598e2
>
> "The GENERIC is Fortran is designed as such that the invocation is resolved at
> compile time to a specific binding. In your case, af2%do() and af2%get() both
> are solved to call binding a2f%doit() and af2%getit(). These two calls are
> equivalent to af2%doit() and af2%getit(). And based on the dynamic type of
> af2, routines doit2() and getit2() are both called."
This presumably applies to operators?
I sincerely hope so because this will make life MUCH easier.
Cheers
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43945