2015-09-24 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / g77 / 19990826-2.f
blob8870c2588d40e68e62bc675b377af7b7905a4cbf
1 c { dg-do run }
2 c { dg-options "-std=legacy" }
4 * From: "Billinghurst, David (RTD)" <David.Billinghurst@riotinto.com.au>
5 * Subject: RE: single precision complex bug in g77 - was Testing g77 with LA
6 * PACK 3.0
7 * Date: Thu, 8 Jul 1999 00:55:11 +0100
8 * X-UIDL: b00d9d8081a36fef561b827d255dd4a5
10 * Here is a slightly simpler and neater test case
12 program labug3
13 implicit none
15 * This program gives the wrong answer on mips-sgi-irix6.5
16 * when compiled with g77 from egcs-19990629 (gcc 2.95 prerelease)
17 * Get a = 0.0 when it should be 1.0
19 * Works with: -femulate-complex
20 * egcs-1.1.2
22 * Originally derived from LAPACK 3.0 test suite.
24 * David Billinghurst, (David.Billinghurst@riotinto.com.au)
25 * 8 July 1999
27 complex one, z
28 real a, f1
29 f1(z) = real(z)
30 one = (1.,0.)
31 a = f1(one)
32 if ( abs(a-1.0) .gt. 1.0e-5 ) then
33 write(6,*) 'A should be 1.0 but it is',a
34 call abort()
35 end if
36 end