egcs-g77 and array indexing
Edward Seidl
etseidl@jutland.ca.sandia.gov
Wed Nov 26 10:38:00 GMT 1997
Hi,
I have some horrible spaghetti code I'm trying compile with egcs-g77,
but it's puking on code like the example below. I have no idea if it's
legal fortran or not, and I'm in no position to change it. All I do know
is it compiles with a number of other compilers, including f2c and
g77-0.5.19.1/gcc-2.7.2.1. When I try to compile with egcs-2.90.18 971122
I get the following (on both i686-pc-linux-gnu and alphaev56-unknown-linux-gnu):
foo.f: In subroutine `foobar':
foo.f:11:
subroutine foobar(norb,nnorb)
^
Array `norb' at (^) is too large to handle
The i686-pc-linux-gnu version was vanilla, but the alphaev56 version required
a few hacks to compile (namely adding -mev56 to the asm_spec).
I see that this has already been reported to the list, but thought I'd
add another data point.
Ed
--------------------------------------------------------
program foo
implicit integer(A-Z)
dimension norb(6)
nnorb=6
call foobar(norb,nnorb)
stop
end
subroutine foobar(norb,nnorb)
implicit integer(A-Z)
dimension norb(-1:*)
do 10 i=-1,nnorb-2
norb(i) = i+999
10 continue
return
end
--------------------------------------------------------
--
Edward Seidl Sandia National Laboratories, California
etseidl@jutland.ca.sandia.gov Department 8950, MS 9214
(510) 294-3693 (voice) Livermore, CA 94551
(510) 294-2234 (fax)
More information about the Gcc-bugs
mailing list