Hi Mikael,

>> And then, the call to gfc_match_varspec shouldn't be there in the first
>> place.  I'll test the following later.
>
> It seems like the parts you're removing have essentially been there
> since day zero. Would be interesting to know if (and where) your patch
> fails.

actually I just tried it myself, and I did not see any failures in the
testsuite. So in fact it seems like it might be ok to remove it.
However, one should carefully check the standard, in order to make
sure that this is really invalid in all cases, and that the
"gfc_match_varspec" is not needed for some corner case, which is not
covered by the testsuite.

As the comment says which the patch is removing, the gfc_match_varspec
should be relevant for cases like this:

print *,char_func()(1:3)
print *,array_func()(2)
print *,derived_type_func()%comp

Are we sure that all of these are actually invalid? (At least they are
rejected by gfortran.) Or are there other cases which would be valid?

Cheers,
Janus

Reply via email to