This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
A question concerning ambiguous interfaces involving unlimited polymorphic formal arguments
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, jerry DeLisle <jvdelisle at charter dot net>
- Date: Sun, 1 Mar 2015 13:07:43 +0100
- Subject: A question concerning ambiguous interfaces involving unlimited polymorphic formal arguments
- Authentication-results: sourceware.org; auth=none
Dear All,
Jerry found that the example of OOP given in the PGI Insider will not
compile with gfortran because it does not distinguish unlimited
polymorphic formal arguments from any other type or kind. This is
trapped at interface.c:487;
if (ts1->type == BT_CLASS
&& ts1->u.derived->components->ts.u.derived->attr.unlimited_polymorphic)
return 1;
On removing this, gfortran is happy with the example.
Otherwise, 'addValue has to be removed from the generic 'add' and
called explicitly from each of the other generics subroutines.
I am unable to find any enlightenment in the F2003 standard as to
which is correct.
Does anybody know how this should be resolved?
Cheers
Paul