This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] PR31298 - support multiple loading of (renamed) operators in USE


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]