Debian Codegraph @

gcc/testsuite/gfortran.dg/g77/19990826-2.f

raw
1 c { dg-do run }
2 c { dg-options "-std=legacy" }
3 c
4 * From: "Billinghurst, David (RTD)" <[email protected]>
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
9
10 * Here is a slightly simpler and neater test case
11
12 program labug3
13 implicit none
14
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
18 *
19 * Works with: -femulate-complex
20 * egcs-1.1.2
21 *
22 * Originally derived from LAPACK 3.0 test suite.
23 *
24 * David Billinghurst, ([email protected])
25 * 8 July 1999
26 *
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 STOP 1
35 end if
36 end