OSDN Git Service

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