[Patch, Fortran, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.

Janus Weil janus@gcc.gnu.org
Sun Aug 7 10:57:00 GMT 2011


>> OK from my side (given Mikael's comments), provided you spell resolve.c with
>> two e :-)
>
> Thanks, guys. Committed as r177545 (including your comments).


Ok, with the 'trivial' parts out of the way, the remainder of my
previously proposed patch becomes rather compact (see attachment).

Thomas' ongoing criticism is that rejecting all nonzero return values
of 'gfc_dep_compare_expr' will reject too much (i.e. cases where we
can not prove that the expressions are equal, but they may still be).

My feeling is that only throwing a warning for a result of '-2' is too
weak, because the majority of cases will have that result (just think
'len=3' vs. 'len=n').

Instead I could offer to try to extend the return values of
'gfc_dep_compare_expr' to distinguish between the following cases
(which right now would both result in '-2'):

a) We can not determine the relationship between both expressions, but
we know they are different for certain input values. (This case would
include e.g. different expr_type)

b) We cannot make any statement.

Is this the way to go? Or are there any other proposals for resolving
this argument?

Cheers,
Janus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr49638_v3.diff
Type: text/x-diff
Size: 2144 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110807/f3623a36/attachment.bin>


More information about the Fortran mailing list