(j3.2006) (SC22WG5.3774) Response on the TR29113 draft N1761
Reinhold Bader
Reinhold.Bader at lrz.de
Mon Dec 8 16:38:40 EST 2008
Aleksandar Donev schrieb:
> Hi,
>
> I am still processing Reinhold's proposals, but this I have thought
> about already:
>
>
>> Issue 2 - polymorphism of assumed-type entity:
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Since no changes to the definition of C_LOC() have been introduced,
>> and this function is used to cast an object of TYPE(*) to a usable
>> type, the text beginning in line 92 of N1761 should be replaced by
>>
> I am not sure I understand. If the dummy is TYPE(*), and the actual is
> polymorphic, then the assumed type of the dummy becomes the dynamic
> type of the actual. It is no longer polymorphic once you are inside the
> procedure.
That is how the TR in its present form wants it to be, and I intuitively
followed the otherwise valid
rule that a CLASS(x) actual cannot ever be matched do a TYPE(x) dummy in
formulating my
issue.
And the implications of allowing polymorphism here still make me squirm
because of
unintended side effects like having a TYPE(*), VOLATILE dummy and
coaxing the external
mechanism into changing the type of this object from outside :-)
> So what is the problem with doing C_LOC on it?
>
>
>> "In the association of actual and dummy arguments, an assumed-type
>> dummy argument is type and kind compatible with a non-polymorphic
>> actual data argument of any type."
>>
> I think there be some restriction that the type should be interoperable
> if the procedure is BIND(C). But I am not sure it can be made to work.
> It definitely requires more work.
>
> Best,
> Aleks
>
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
>
More information about the J3
mailing list