This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/43945] [OOP] Derived type with GENERIC: resolved to the wrong specific TBP



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]