http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47845
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
Summary|Polymorphic deferred |[OOP] Polymorphic deferred
|function: Not matched class |function: Not matched class
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-22
07:06:48 UTC ---
The following is in any case wrong:
TYPE,ABSTRACT::vec
CONTAINS
PROCEDURE,PASS::set_vec=>set_vec_sub
with
SUBROUTINE set_vec_sub(this,x,y)
and
TYPE,EXTENDS(vec),PUBLIC::vec3d
CONTAINS
PROCEDURE,PUBLIC,PASS::set_vec=>set_vec_3d
with
SUBROUTINE set_vec_3d(this,x,y,z)
NAG's error message is
Error: Overriding type-bound procedure SET_VEC of type VEC3D has 4 arguments,
but overridden one has 3 arguments
Which matches gfortran's
PROCEDURE,PUBLIC,PASS::set_vec=>set_vec_3d
1
Error: 'set_vec' at (1) must have the same number of formal arguments as the
overridden procedure
See Fortran 2008, "4.5.7.3 Type-bound procedure overriding":
"The overriding and overridden type-bound procedures shall satisfy the
following conditions. [...] They shall have the same number of dummy
arguments."
See: http://gcc.gnu.org/wiki/GFortranStandards
I have not checked the other error messages.