Hi Aleks,
On Feb 9, 2008, at 10:53 PM, Aleksandar Donev wrote:
> Clune, Thomas L. (GSFC-610.3) wrote:
>> test had failed under one vendor, and I then sought the standard
>> which seemed to back up the error message I was seeing.
> Can you please explain (or quote) what exactly the message is? You
> said:
> "one cannot extend the private type bound procedures"
> which I cannot make sense of, so some pointer to the standard or
> the error message would help in figuring what the standard actually
> says. Your code seems perfectly reasonable to me, but that may be
> just me :-)
> Thanks,
> Aleks
The error message is below - I had left out the word "deferred".
(Apologies to NAG - I usually try to keep potential implementation
issues out of this forum.)
Error: oo_style.F90, line 31: Cannot extend abstract type
ABSTRACTVISITOR because it has a private deferred type-bound
procedure VISITREAL
detected at ABSTRACTPRINTER@<end-of-statement>
Error: oo_style.F90, line 31: Cannot extend abstract type
ABSTRACTVISITOR because it has a private deferred type-bound
procedure VISITINTEGER
detected at ABSTRACTPRINTER@<end-of-statement>
The section of the standard that seems to support this notion is in
section 4.5.6.1 Inheritance:
NOTE 4.51
Inaccessible components and bindings of the parent type are also
inherited, but they remain inac-
cessible in the extended type. Inaccessible entities occur if the
type being extended is accessed via
use association and has a private entity.
I guess that it hinges on whether providing an actual procedure in
place of a deferred counts as "accessing". Too tired to try to dig
through the standard at the moment. If the NAG message is correct,
then the standard might as well forbid private deferred bindings, as
no concrete subclass can ever be defined.
Cheers,
- Tom
Cheers,
- Tom
|