summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/g77/980310-8.f
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gfortran.dg/g77/980310-8.f
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gfortran.dg/g77/980310-8.f')
-rw-r--r--gcc/testsuite/gfortran.dg/g77/980310-8.f41
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/g77/980310-8.f b/gcc/testsuite/gfortran.dg/g77/980310-8.f
new file mode 100644
index 000000000..c20f2d720
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/g77/980310-8.f
@@ -0,0 +1,41 @@
+c { dg-do compile }
+C To: egcs-bugs@cygnus.com
+C Subject: egcs-g77 and array indexing
+C Reply-To: etseidl@jutland.ca.sandia.gov
+C Date: Wed, 26 Nov 1997 10:38:27 -0800
+C From: Edward Seidl <etseidl@jutland.ca.sandia.gov>
+C
+C I have some horrible spaghetti code I'm trying compile with egcs-g77,
+C but it's puking on code like the example below. I have no idea if it's
+C legal fortran or not, and I'm in no position to change it. All I do know
+C is it compiles with a number of other compilers, including f2c and
+C g77-0.5.19.1/gcc-2.7.2.1. When I try to compile with egcs-2.90.18 971122
+C I get the following (on both i686-pc-linux-gnu and
+C alphaev56-unknown-linux-gnu):
+C
+Cfoo.f: In subroutine `foobar':
+Cfoo.f:11:
+C subroutine foobar(norb,nnorb)
+C ^
+CArray `norb' at (^) is too large to handle
+
+ 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