This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g77 fails to compile legal code, make dvi breaks
- To: burley at gnu dot org
- Subject: Re: g77 fails to compile legal code, make dvi breaks
- From: Joe Harrington <jh at oobleck dot tn dot cornell dot edu>
- Date: Fri, 5 Jun 1998 13:17:39 -0400
- CC: egcs-bugs at cygnus dot com
- CC: jh at oobleck dot tn dot cornell dot edu
- References: <199806051629.MAA02967@melange.gnu.org>
- Reply-To: jh at oobleck dot tn dot cornell dot edu
>>I just installed egcs-1.0.3a from source on an i686 with binutils
>>2.9.1.0.4. The g77s in 1.0.1, 1.0.2, and 1.0.3a all fail on the
>>following piece of standard code. The problem is passed
>>subroutine/function call arguments with a declaration like:
>I think that's a known bug in egcs-1.0, fixed in egcs-1.1 when it
>comes out. But it's hard to tell without more info. (I *thought*
>that parrticular bug was fixed in egcs-1.0.3a, though?)
If you put the following code into a file, say foo.f, and try to
compile it with g77 from 1.0.3a, you get the error that follows it...
LOGICAL FUNCTION ELEMD ( ITEM, A )
INTEGER LBCELL
PARAMETER ( LBCELL = -5 )
DOUBLE PRECISION ITEM
DOUBLE PRECISION A ( LBCELL:* )
% g77 -c foo.f
foo.f: In function `elemd':
foo.f:3:
INTEGER LBCELL
^
End of source file before end of block started at (^)
foo.f:1:
LOGICAL FUNCTION ELEMD ( ITEM, A )
^
Array `a' at (^) is too large to handle
...just to show it's not due to the short file, the full file is
appended. Hope that's the info you need... Thanks!
--jh--
C$Procedure ELEMD ( Element of a double precision set )
LOGICAL FUNCTION ELEMD ( ITEM, A )
C$ Abstract
C
C Determine whether an item is an element of a double
C precision set.
C
C$ Required_Reading
C
C SETS
C
C$ Keywords
C
C CELLS, SETS
C
C$ Declarations
INTEGER LBCELL
PARAMETER ( LBCELL = -5 )
DOUBLE PRECISION ITEM
DOUBLE PRECISION A ( LBCELL:* )
C$ Brief_I/O
C
C VARIABLE I/O DESCRIPTION
C -------- --- --------------------------------------------------
C ITEM I Item to be tested.
C A I Set to be tested.
C
C The function returns TRUE if ITEM is an element of set A.
C
C$ Detailed_Input
C
C ITEM is an item which may or may not be an element of
C the input set.
C
C
C A is a set.
C
C
C$ Detailed_Output
C
C The function returns TRUE if ITEM is a member of the set A,
C and returns FALSE otherwise.
C
C$ Parameters
C
C None.
C
C$ Particulars
C
C The LOGICAL functions ELEMC and ELEMI correspond to the
C set operator IN in the Pascal language.
C
C$ Examples
C
C Let the character sets PLANETS and ASTEROIDS contain the
C following elements.
C
C PLANETS ASTEROIDS
C -------- ----------
C 'Earth' 'Apollo'
C 'Mars' 'Ceres'
C 'Pluto'
C 'Venus'
C
C Then all of the following expressions are true.
C
C ELEMC ( 'Earth', PLANETS )
C ELEMC ( 'Pluto', PLANETS )
C ELEMC ( 'Ceres', ASTEROIDS )
C
C And all of the following expressions are false.
C
C ELEMC ( 'Saturn', PLANETS )
C ELEMC ( 'Pluto', ASTEROIDS )
C ELEMC ( 'CERES', ASTEROIDS )
C
C$ Restrictions
C
C None.
C
C$ Exceptions
C
C None.
C
C$ Files
C
C None.
C
C$ Literature_References
C
C None.
C
C$ Author_and_Institution
C
C N.J. Bachman (JPL)
C C.A. Curzon (JPL)
C W.L. Taber (JPL)
C I.M. Underwood (JPL)
C
C$ Version
C
C- SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)
C
C Comment section for permuted index source lines was added
C following the header.
C
C- SPICELIB Version 1.0.0, 31-JAN-1990 (CAC) (WLT) (IMU)
C
C-&
C$ Index_Entries
C
C element of a d.p. set
C
C-&
C$ Revisions
C
C- Beta Version 2.0.0, 13-MAR-1989 (NJB)
C
C Now participates in error handling. References to RETURN,
C CHKIN, and CHKOUT added.
C
C-&
C
C SPICELIB functions
C
INTEGER BSRCHD
INTEGER CARDD
LOGICAL RETURN
C
C Standard error handling:
C
IF ( RETURN() ) THEN
RETURN
ELSE
CALL CHKIN ( 'ELEMD' )
END IF
C
C Just a binary search.
C
ELEMD = ( BSRCHD ( ITEM, CARDD ( A ), A(1) ) .NE. 0 )
CALL CHKOUT ( 'ELEMD' )
RETURN
END