[patch, Fortran] Fix PR 71902

Mikael Morin morin-mikael@orange.fr
Sun Aug 21 14:39:00 GMT 2016


Le 18/08/2016 à 21:24, Thomas Koenig a écrit :
> Hello Mikael,
>
>> This doesn't look correct, what about substrings following component or
>> array references?
>
> You're right; corrected in the attached patch.  I have also added a test
> case for this.
>
>> PS: What about the original fix, wasn't it a dependency
>> problem/inaccuracy after all?
>
> The main error was using the allocatable attribute on the symbol that
> we were dealing with a deferred length.  Changing the test to check for
> expr->ts.deferred is the right thing to do.
>
Seems sensible.  However deferred length includes pointers as well, so I 
would still keep additionally the original test for allocatable-ness. 
Or even better replace it with gfc_expr_attr(expr1).allocatable.
OK with that change.
Thanks

Mikael



More information about the Fortran mailing list