PR30372
Janne Blomqvist
Janne.Blomqvist@tkk.fi
Mon Feb 12 13:33:00 GMT 2007
On Mon, Feb 12, 2007 at 01:34:42PM +0100, Daniel Franke wrote:
> 2007/2/12, Daniel Franke <franke.daniel@gmail.com>:
> >On Monday 12 February 2007 04:14:04 you wrote:
> >> > I started to draft a skript to create testcases that deterministically
> >> > test anything with everything.
> >>
> >> Does it test for real(10) and/or real(16)?
> >
> >How shall the testsuite handle these types? My i686 does not provide
> >real(16)
> >and therefore gfortran errors out with:
> > Error: Kind 16 not supported for type REAL at (1)
>
> For REAL(kind=10) I found (gfortran.dg/large_real_kind_form_io_1.f90):
>
> { dg-require-effective-target fortran_large_real }
> ! This should be 10 on systems that support kind=10
> integer, parameter :: k = selected_real_kind (precision (0.0_8) + 1)
> real(kind=k) :: a,b(2), c, eps
>
> Given the fortran_large_real requirement, is it viable to use:
> real(kind=10) :: r10
> real(kind=16) :: r16
> in the testcases to be created?
No, AFAIK fortran_large_real is enabled for anything that supports
kind>8, including i686. I.e.:
target real kind support fortran_large_real Example target
----------------------------------------------------------------------
4,8 No Most
4,8,10 Yes x86, x86-64
4,8,16 Yes PPC?
4,8,10,16 Yes IA-64?
I guess if you don't want to add new flags to the testsuite
(fortran_really_large_real or
fortran_large_real_i_really_mean_it_this_time?), you could do
something like
! At least IEEE 754 double precision.
integer, parameter :: dp = selected_real_kind(15, 307)
! quad precision, fall back on double if quad is not available.
integer, parameter :: qp_preferred = selected_real_kind(30,1000)
integer, parameter :: qp = max (dp, qp_preferred)
OTOH that would lead to testing the same things 2 times for dp if qp
is not available, so perhaps fortran_really_large_real is needed..
--
Janne Blomqvist
More information about the Fortran
mailing list