OSDN Git Service

2004-07-17 Jeroen Frijters <jeroen@frijters.net>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g77.f-torture / compile / 980310-8.f
1 C To: egcs-bugs@cygnus.com
2 C Subject: egcs-g77 and array indexing
3 C Reply-To: etseidl@jutland.ca.sandia.gov
4 C Date: Wed, 26 Nov 1997 10:38:27 -0800
5 C From: Edward Seidl <etseidl@jutland.ca.sandia.gov>
6 C       
7 C       I have some horrible spaghetti code I'm trying compile with egcs-g77,
8 C       but it's puking on code like the example below.  I have no idea if it's
9 C       legal fortran or not, and I'm in no position to change it.  All I do know
10 C       is it compiles with a number of other compilers, including f2c and
11 C       g77-0.5.19.1/gcc-2.7.2.1.  When I try to compile with egcs-2.90.18 971122
12 C       I get the following (on both i686-pc-linux-gnu and alphaev56-unknown-linux-gnu):
13 C       
14 C       foo.f: In subroutine `foobar':
15 C       foo.f:11: 
16 C                subroutine foobar(norb,nnorb)
17 C                                  ^
18 C       Array `norb' at (^) is too large to handle
19
20       program foo
21       implicit integer(A-Z)
22       dimension norb(6)
23       nnorb=6
24
25       call foobar(norb,nnorb)
26
27       stop
28       end
29
30       subroutine foobar(norb,nnorb)
31       implicit integer(A-Z)
32       dimension norb(-1:*)
33
34       do 10 i=-1,nnorb-2
35         norb(i) = i+999
36   10  continue
37
38       return
39       end