[Patch, fortran] PR25098 - Variable as actual argument for procedure dummy argument allowed
Paul Thomas
paulthomas2@wanadoo.fr
Sat May 27 19:41:00 GMT 2006
tobi,
>> The detection of the error is effected in interface.c. If the actual
>> argument is a variable and the formal argument flavor is procedure, the
>> only way in which this cannot be an error is if the procedure is
>> already compiled but not declared in the current namespace. This is
>
>
> Can you add a comment indicating where this is found in the
> standard? I find this quite surprising, and couldn't find it while
> looking briefly.
I realise that I am uncertain about which part you could not find in the
standard. 12.4.1.2 deals with actual arguments associated with dummy
procedures. It, of course, requires that a dummy procedure is
associated with an actual procedure, which has to be the specific name
of an external, module, dummy or intrinsic procedure. A gsym,
identifies the specific name of an external procedure. I guess that the
point you are making is that this is not mandated by the standard?
> I think it would be cleaner if you issue the error in
> compare_parameter (passing it the locus).
>
I have attached a new version of the patch that is reorganised, as you
suggest; it looks tidier than I anticipated!
It regtests on FC5/Athlon1700. OK for trunk and, when the time is ripe, 4.1?
Thanks
Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resubmit.diff
Type: text/x-patch
Size: 2356 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060527/5e3dfc48/attachment.bin>
More information about the Gcc-patches
mailing list