2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g77.f-torture / compile / 980310-2.f
blob5077c552da8875a084fbcfac960a7e86204196be
1 C unable to confirm this bug on egcs 1.0.1 for i586-pc-sco3.2v5.0.4 robertl
3 C Date: Sat, 23 Aug 1997 00:47:53 -0400 (EDT)
4 C From: David Bristow <dbristow@lynx.dac.neu.edu>
5 C To: egcs-bugs@cygnus.com
6 C Subject: g77 crashes compiling Dungeon
7 C Message-ID: <Pine.OSF.3.91.970823003521.11281A-100000@lynx.dac.neu.edu>
9 C The following small segment of Dungeon (the adventure that became the
10 C commercial hit Zork) causes an internal error in f771. The platform is
11 C i586-pc-linux-gnulibc1, the compiler is egcs-ss-970821 (g77-GNU Fortran
12 C 0.5.21-19970811)
14 C --cut here--cut here--cut here--cut here--cut here--cut here--
15 C g77 --verbose -fugly -fvxt -c subr_.f
16 C g77 version 0.5.21-19970811
17 C gcc --verbose -fugly -fvxt -xf77 subr_.f -xnone -lf2c -lm
18 C Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.01/specs
19 C gcc version egcs-2.90.01 970821 (gcc2-970802 experimental)
20 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
21 C f771: warning: -fugly is overloaded with meanings and likely to be removed;
22 C f771: warning: use only the specific -fugly-* options you need
23 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).
24 C GNU Fortran Front End version 0.5.21-19970811
25 C f/com.c:941: failed assertion `TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (e))'
26 C gcc: Internal compiler error: program f771 got fatal signal 6
27 C --cut here--cut here--cut here--cut here--cut here--cut here--
29 C Here's the FORTRAN code, it's basically a single subroutine from subr.f
30 C in the Dungeon source, slightly altered (the original calls RAN(), which
31 C doesn't exist in the g77 runtime)
33 C RND - Return a random integer mod n
35 INTEGER FUNCTION RND (N)
36 IMPLICIT INTEGER (A-Z)
37 REAL RAND
38 COMMON /SEED/ RNSEED
40 RND = RAND(RNSEED)*FLOAT(N)
41 RETURN
43 END