This is the mail archive of the 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] PR 42072: [F03] wrong-code with C_F_PROCPOINTER


> x86_64-unknown-linux-gnu with no failures. Ok for trunk?

OK for trunk (and fortran-dev :-))
> Two side-notes:
> 1) About the wrong static decl (cf. comments #3 and #5): I currently
> have no idea how this comes about, and why the static prototype is
> different from the actual declaration of the function. Does anyone
> have an idea?

That is indeed very odd and clearly incorrect.  Could you please raise
a new PR for this?

> 2) Once again I stumbled over the fact that the ISO_C_BINDING
> intrinsics are handled in gfc_conv_procedure_call, in contrast to all
> the other intrinsics, which are translated in trans-intrinsic.c. It
> seems to me that gfc_conv_procedure_call is not a particularly good
> place for this, as it is already a *huge* routine (several hundred
> lines), even without the additional clobbering due to these
> intrinsics. Is there a special reason that this is done in this very
> place, or should we rather move this code to trans-intrinsic.c? (If
> the latter, I would open a cleanup PR for this.)

I have been eying gfc_conv_procedure_call with a view to breaking out
the various sections into functions so that its structure becomes
apparent once more.  I have not thought about it much and would
certainly applaud anybody taking it upon themselves to do it.  As
usual, such a task requires identifying the seams such that argument
lists do not become as long as the functions being replaced :-)  As
for doing the ISO_C_BINDING in gfc_conv_procedure_call, I do not have
any opinion, other than to note that the "normal" intrinsics are
different beasts altogether.

Thanks for the fix


> 2009-11-17 ?Janus Weil ?<>
> ? ? ? ?PR fortran/42072
> ? ? ? ?* trans-expr.c (gfc_conv_procedure_call): Handle procedure pointer
> ? ? ? ?dummies which are passed to C_F_PROCPOINTER.
> 2009-11-17 ?Janus Weil ?<>
> ? ? ? ?PR fortran/42072
> ? ? ? ?* gfortran.dg/proc_ptr_8.f90: Extended.

The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy

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