OSDN Git Service

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