[Patch, Fortran] PR 48174+45304: No varags if interface is known

Bob Deen Bob.Deen@jpl.nasa.gov
Tue Mar 22 16:25:00 GMT 2011


Hi Tobias...

I've been a lurker here since I posted a problem with varargs (stdarg, 
really) interfaces back on May 31, 2010 ("Variable argument call does 
not work on 64-bit gfortran").  You were able to determine that my 
problem existed on gfortran 4.1 but was fixed in all of 4.2 through 4.6, 
although you weren't sure how it got fixed.  We switched to 4.4 and 
everything worked fine.  I appreciate the help!!

This proposed patch is probably okay but makes me nervous.  However, the 
"related" issue scares me.  Referring to my original email, we have a 
large legacy f77 system with 15,000 calls to C stdarg functions. 
Because the stdarg and non-stdarg ABI appears to be different for x86_64 
platforms, these need to be called using the stdarg ABI.

So I hope you can understand why I might be nervous when something is 
tweaked in this area!

Our code does not declare these routines to Fortran, therefore the 
procedure interface is unknown and this patch "should" not bother 
anything.  But for the related issue... deducing the interface from 
usage is likely to break things badly in my case (and doesn't sound very 
robust in any case).  Unless I'm misunderstanding the application of the 
issue?

Would it be possible for you to try my test case again after this patch, 
just to make sure?  I can post it again if you like.

Thanks...

-Bob

Bob Deen  @  NASA-JPL Multimission Image Processing Lab
Bob.Deen@jpl.nasa.gov


On 3/22/11 1:21 AM, Tobias Burnus wrote:
> This patch makes sure that there is no vararg if the procedure interface
> is known. Before, for functions and subroutines without arguments, no
> void_list_node.
>
> (Related, separate and unfixed issue: For procedures without explicit
> interface, the interface should be deduced from the usage.)
>
> Build and regtested on x86-64-linux.
> OK for the trunk?
>
> Tobias



More information about the Gcc-patches mailing list