[Patch, Fortran] PR31298 - support multiple loading of (renamed) operators in USE
Jerry DeLisle
jvdelisle@verizon.net
Sun Aug 26 18:44:00 GMT 2007
Tobias Burnus wrote:
> :ADDPATCH fortran:
>
> This adds support for:
>
> USE mod, only: operator(.op.), operator(.new.)=>operator(.op.),
> operator(.another.)=>operator(.op.)
>
> Before only a single rename/import was supported.
>
> The algorithm is partially copied from load_generic_interfaces.
>
> I initially hoped to do:
>
> if(i==1) [...]
> sym = uop->operator->sym
> else [...]
> uop->operator->sym = sym
>
> but this fails as sym == NULL. And
>
> if(i==1) [...]
> operator = uop->operator
> else [...]
> uop->operator = operator
>
> only works if one disables gfc_free_interface() as otherwise the memory
> is deallocated twice.
>
> Build and regression tested on x86-64/Linux. Ok for the trunk?
>
This is OK,
Thanks,
Jerry
More information about the Fortran
mailing list