summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/g77/980310-2.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-2.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-2.f')
-rw-r--r--gcc/testsuite/gfortran.dg/g77/980310-2.f44
1 files changed, 44 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/g77/980310-2.f b/gcc/testsuite/gfortran.dg/g77/980310-2.f
new file mode 100644
index 000000000..1ed5efc59
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/g77/980310-2.f
@@ -0,0 +1,44 @@
+c { dg-do compile }
+C unable to confirm this bug on egcs 1.0.1 for i586-pc-sco3.2v5.0.4 robertl
+C
+C Date: Sat, 23 Aug 1997 00:47:53 -0400 (EDT)
+C From: David Bristow <dbristow@lynx.dac.neu.edu>
+C To: egcs-bugs@cygnus.com
+C Subject: g77 crashes compiling Dungeon
+C Message-ID: <Pine.OSF.3.91.970823003521.11281A-100000@lynx.dac.neu.edu>
+C
+C The following small segment of Dungeon (the adventure that became the
+C commercial hit Zork) causes an internal error in f771. The platform is
+C i586-pc-linux-gnulibc1, the compiler is egcs-ss-970821 (g77-GNU Fortran
+C 0.5.21-19970811)
+C
+C --cut here--cut here--cut here--cut here--cut here--cut here--
+C g77 --verbose -fugly -fvxt -c subr_.f
+C g77 version 0.5.21-19970811
+C gcc --verbose -fugly -fvxt -xf77 subr_.f -xnone -lf2c -lm
+C Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.01/specs
+C gcc version egcs-2.90.01 970821 (gcc2-970802 experimental)
+C /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.01/f771 subr_.f -fset-g77-defaults -quiet -dumpbase subr_.f -version -fversion -fugly -fvxt -o /tmp/cca23974.s
+C f771: warning: -fugly is overloaded with meanings and likely to be removed;
+C f771: warning: use only the specific -fugly-* options you need
+C GNU F77 version egcs-2.90.01 970821 (gcc2-970802 experimental) (i586-pc-linux-gnulibc1) compiled by GNU C version egcs-2.90.01 970821 (gcc2-970802 experimental).
+C GNU Fortran Front End version 0.5.21-19970811
+C f/com.c:941: failed assertion `TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (e))'
+C gcc: Internal compiler error: program f771 got fatal signal 6
+C --cut here--cut here--cut here--cut here--cut here--cut here--
+C
+C Here's the FORTRAN code, it's basically a single subroutine from subr.f
+C in the Dungeon source, slightly altered (the original calls RAN(), which
+C doesn't exist in the g77 runtime)
+C
+C RND - Return a random integer mod n
+C
+ INTEGER FUNCTION RND (N)
+ IMPLICIT INTEGER (A-Z)
+ REAL RAND
+ COMMON /SEED/ RNSEED
+
+ RND = RAND(RNSEED)*FLOAT(N)
+ RETURN
+
+ END