This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran, patch] Fix -ff2c type mismatches
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Tobias Schl?ter <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 27 Feb 2007 09:37:59 -0800
- Subject: Re: [gfortran, patch] Fix -ff2c type mismatches
- References: <20061217202108.439rm1x79c048c8k@webmail.physik.uni-muenchen.de> <20061219180719.GA15076@troutmask.apl.washington.edu> <45E468F9.5070609@physik.uni-muenchen.de>
On Tue, Feb 27, 2007 at 06:23:05PM +0100, Tobias Schl?ter wrote:
> Steve Kargl wrote:
> >On Sun, Dec 17, 2006 at 08:21:08PM +0100, Tobias Schl?ter wrote:
> >>f2c calling conventions require that a scalar default REAL function
> >>actually returns the C type double. Our current implementation makes
> >>the function symbol's backend_decl of type double, which in the case
> >>of no explicit RESULT variable leads to all kinds of type mismatches.
> >>This patch fixes this, by only making the function REAL*8, not the
> >>RESULT variable, and then converting the result variable to REAL*8
> >>when passing it to the function result.
> >>
> >>Built and tested on i386-darwin, this passes the testsuite except for
> >>the failures which are due to PR29516. Ok?
> >>
> >
> >OK.
> >
> >Note, this bootstrapped and passed regression testing on x86_64-*-freebsd.
> >
> >Tobi, this might be considered a regression with respect to g77
> >(although I believe g77 did not support RESULT). I'll leave it
> >to your discretion whether to backport to the 4.2 branch.
>
> Unless somebody objects, I'll put the patch into 4.1 as well. People in
> the Real World are using 4.1, and the bug seems to affect them.
>
I have no objections.
--
Steve