OSDN Git Service

664be865f5b4fb342340e3bf8bcd6262436aaf3a
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / large_real_kind_3.F90
1 ! { dg-do run }
2 ! { dg-require-effective-target fortran_large_real }
3 ! { dg-xfail-if "" { "powerpc*-apple-darwin*" } { "*" }  { "" } }
4
5 ! Testing erf and erfc library calls on large real kinds (larger than kind=8)
6   implicit none
7
8   integer,parameter :: k = selected_real_kind (precision (0.0_8) + 1)
9   real(8),parameter :: eps = 1e-8
10
11   real(kind=k) :: x
12   real(8) :: y
13
14 #define TEST_FUNCTION(func,val) \
15  x = val ;\
16  y = x ;\
17  x = func (x) ;\
18  y = func (y) ;\
19  if (abs((y - x) / y) > eps) call abort
20   
21  TEST_FUNCTION(erf,1.45123231)
22  TEST_FUNCTION(erfc,-0.123789)
23  
24 end