OSDN Git Service

2004-07-17 Jeroen Frijters <jeroen@frijters.net>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g77.f-torture / execute / 19990826-2.f
1 * From: "Billinghurst, David (RTD)" <David.Billinghurst@riotinto.com.au>
2 * Subject: RE: single precision complex bug in g77 - was Testing g77 with LA
3 *       PACK 3.0
4 * Date: Thu, 8 Jul 1999 00:55:11 +0100 
5 * X-UIDL: b00d9d8081a36fef561b827d255dd4a5
6
7 * Here is a slightly simpler and neater test case
8
9       program labug3
10       implicit none
11
12 *  This program gives the wrong answer on mips-sgi-irix6.5
13 *  when compiled with g77 from egcs-19990629 (gcc 2.95 prerelease)
14 *  Get a = 0.0 when it should be 1.0 
15 *
16 *  Works with:  -femulate-complex
17 *               egcs-1.1.2 
18 *
19 *  Originally derived from LAPACK 3.0 test suite.
20 *
21 *  David Billinghurst, (David.Billinghurst@riotinto.com.au)
22 *  8 July 1999
23
24       complex one, z
25       real    a, f1
26       f1(z) = real(z)
27       one = (1.,0.)
28       a = f1(one) 
29       if ( abs(a-1.0) .gt. 1.0e-5 ) then
30          write(6,*) 'A should be 1.0 but it is',a
31          call abort()
32       end if
33       end