2011-05-23 Tom de Vries <tom@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / csqrt_2.f
blobdc3d9a80d40a94f135c57215cf32950a1a6922b8
1 c { dg-do run }
2 c Fix PR libgfortran/24313
3 complex x, y
4 complex z
5 z = cmplx(0.707106, -0.707106)
6 x = cmplx(0.0,-1.0)
7 y = sqrt(x)
8 if (abs(y - z) / abs(z) > 1.e-4) call abort
10 x = cmplx(tiny(1.),-1.0)
11 y = sqrt(x)
12 if (abs(y - z) / abs(z) > 1.e-4) call abort
14 x = cmplx(-tiny(1.),-1.0)
15 y = sqrt(x)
16 if (abs(y - z) / abs(z) > 1.e-4) call abort
18 end