This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
FAIL of specifics.f90
- From: Steven Bosscher <stevenb at suse dot de>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Sun, 27 Jun 2004 18:40:58 +0200
- Subject: FAIL of specifics.f90
- Organization: SUSE Labs
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
program specifics
intrinsic dprod
call test_dprod(dprod)
end program
How can test_dprod know that the function result of fn is
a double precision? As far as I can tell, it cannot, and
indeed, if I rework the test case as follows:
subroutine test_dprod(fn)
implicit double precision (f)
if (abs (fn (2.e0, 3.e0) - 6d0) .gt. 0.00001) call abort
end subroutine
program specifics
intrinsic dprod
call test_dprod(dprod)
end program
Now the test case passes.
(Adding an interface also helps btw, for all of you who share
my disgust of implicit typing ;-)
So, is the test case just wrong, or am I missing something?
Gr.
Steven