This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: FAIL of specifics.f90
- From: Paul Brook <paul at codesourcery dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Steven Bosscher <stevenb at suse dot de>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 27 Jun 2004 21:57:51 +0100
- Subject: Re: FAIL of specifics.f90
- Organization: CodeSourcery
- References: <200406271840.58494.stevenb@suse.de>
On Sunday 27 June 2004 17:40, Steven Bosscher wrote:
> Hi,
>
> The test suite failure on amd64 of specifics.f90 can be
> reduced to the following smaller test case:
>
> subroutine test_dprod(fn)
> if (abs (fn (2.0, 3.0) - 6d0) .gt. 0.00001) call abort
> end subroutine
<snip>
> So, is the test case just wrong, or am I missing something?
The testcase is wrong. fn needs to be given double precision type. It works by
chance on x86 because teh ABI promotest the return type anyway.
Fixed as follows:
2004-06-27 Paul Brook <paul@codesourcery.com>
* gfortran.fortran-torture/execute/specfics.f90: Use correct typing.
Index: gfortran.fortran-torture/execute/specifics.f90
===================================================================
RCS
file: /var/cvsroot/gcc-cvs/gcc/gcc/testsuite/gfortran.fortran-torture/execute/specifics.f90,v
retrieving revision 1.2
diff -u -p -r1.2 specifics.f90
--- gfortran.fortran-torture/execute/specifics.f90 13 May 2004 06:40:53 -0000
1.2
+++ gfortran.fortran-torture/execute/specifics.f90 27 Jun 2004 20:50:56 -0000
@@ -52,6 +52,7 @@ end function
end subroutine
subroutine test_dprod(fn)
+ double precision fn
if (abs (fn (2.0, 3.0) - 6d0) .gt. 0.00001) call abort
end subroutine