This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: fortran at gcc dot gnu dot org
- Cc: Thomas Koenig <tkoenig at netcologne dot de>, Janus Weil <janus at gcc dot gnu dot org>, "gcc-patches" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 5 Aug 2011 23:44:53 +0200
- Subject: Re: [Patch, Fortran, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.
- References: <CAKwh3qi6E=YrGir32itb2ggRUaKbvoxiQ+fG5aO6FQUVHNMPxw@mail.gmail.com> <4E3C5A69.3000305@netcologne.de>
On Friday 05 August 2011 23:02:33 Thomas Koenig wrote:
> > The extra
> > argument controls whether we check variable symbols for equality or
> > just their names. For the overriding checks it is sufficient to check
> > for names, because the arguments of the overriding procedure are
> > required to have the same names as in the base procedure.
>
> Could you explain for which cases this test is too strict?
For dummy arguments. If they are "corresponding" (same position, same name),
they should compare equal. Cf the PR.
This lets me think that one should enable the comparison by name for dummy
arguments only. Other variables should compare normally.
Mikael