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