[Patch, Fortran, F03] PR 40869: PPC assignment checking
Daniel Kraft
d@domob.eu
Thu Aug 27 17:56:00 GMT 2009
Hi Janus!
Janus Weil wrote:
> So, what I did in this case was to simplify the problem by using not
> the component itself for the comparison, but instead the symbol which
> it gets its interface from (ts.interface). Since this is a normal
> gfc_symbol, it can be passed to the existing gfc_compare_interfaces
> without any problem. One drawback of this method is that the error
> messages contain the wrong name, or an empty name (if the PPC was
> declared like e.g. "procedure(real), pointer ..."). So far this is the
> only drawback I see. And this method is a lot more elegant than any of
> the other solutions I could think of.
I think this solution is ok. You could of course add two arguments for
the names for error messages to gfc_compare_interfaces to fix that
problem, but I'm not sure if that's really needed (at least not for now).
Or, for all of these problems you could try to rework
gfc_compare_interfaces to work only on some common part of the things it
is passed (similar to your polymorphism approach for gcc-in-cxx) where
possible, I tried this some times for TBPs -- but of course this is not
always possible, and in your particular case here I think your solution
is quite elegant.
> The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk?
Ok.
Thanks for the patch!
Daniel
More information about the Gcc-patches
mailing list