[Patch, Fortran] PR 42072: [F03] wrong-code with C_F_PROCPOINTER
Janus Weil
janus@gcc.gnu.org
Thu Nov 19 14:33:00 GMT 2009
2009/11/19 Jerry DeLisle <jvdelisle@verizon.net>:
> On 11/18/2009 02:55 PM, Janus Weil wrote:
>>>>
>>>> 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.
>>>
>>> Why are they so much different? Regarding the translation, we do
>>> pretty much the same for the ISO_C_BINDING intrinsics as we do for
>>> some of the others, namely replacing the call by some inline code.
>>> E.g. for C_F_PROCPOINTER, we just put in a simple pointer assignment.
>>
>> Well, ok, I can see that they are handled a bit differently in some ways.
>>
>> The least thing one could do would be to just separate out the
>> ISO_C_BINDING special handling code from gfc_conv_procedure_call, to
>> make it less of a monster.
>>
>> The attachted patch does this by just putting the ISO_C_BINDING stuff
>> into a separate routine. And it does so without introducing any
>> regressions in the testsuite (i just checked). Should I commit this to
>> trunk?
>
> OK after some spelling fixes in the comment. A nit, change to:
>
> + /* TODO -- the following two lines shouldn't be necessary, but if
> + they're removed, a bug is exposed later in the code path.
> + This workaround was thus introduced, but will have to be
> + removed; please see PR 35150 for details about the issue. */
Committed as r154327 with the spelling fixes (the comment above is not
mine, I just carried it over from gfc_conv_procedure call).
Cheers,
Janus
More information about the Fortran
mailing list