This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: g77 (0.5.25) select-case bug
- To: "'Olaf Michelsson'" <michelsson at e-technik dot tu-ilmenau dot de>, gcc-bugs at gcc dot gnu dot org
- Subject: RE: g77 (0.5.25) select-case bug
- From: "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com dot au>
- Date: Wed, 15 Mar 2000 00:16:24 -0000
I can reproduce this problem on irix6.5 with g77 version 2.95.1 19990816
(release)
The problem does not occur with the latest snapshot gcc version 2.96
20000313 (experimental)
+++++++++++++++++++++++++++++++++++++++++
(Mr) David Billinghurst
Comalco Research Centre
PO Box 316, Thomastown, Vic, Australia, 3074
Phone: +61 3 9469 0642
FAX: +61 3 9462 2700
Email: David.Billinghurst@riotinto.com.au
> -----Original Message-----
> From: Olaf Michelsson [SMTP:michelsson@e-technik.tu-ilmenau.de]
> Sent: Tuesday, 14 March 2000 21:22
> To: gcc-bugs@gcc.gnu.org
> Subject: g77 (0.5.25) select-case bug
>
> Hello all,
>
> there seems to be a bug in g77 select-case handling.
>
> simplified code, where the error occurs (nothing is redundant anymore
> :-)
> C----------------------------
> SUBROUTINE TEST(I)
>
> INTEGER I,IERR,K,M
>
> SELECT CASE(I)
> CASE(1)
> M=1
> N=1
> C CASE DEFAULT
> WRITE(*,*) I
> IERR=1
> END SELECT
> END
> C-----------------------------
>
> Compilation fails with following message
>
> g77 -v -fno-silent -Wuninitialized -c SOLVT.f
>
> g77 version 2.95.2 19991024 (release) (from FSF-g77 version 0.5.25
> 19991024 (release))
> Reading specs from
> /usr/local/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.2/specs
> gcc version 2.95.2 19991024 (release)
> /usr/local/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.2/f771 SOLVT.f
> -quiet -dumpbase SOLVT.f -Wuninitialized -version -fversion
> -fno-silent -o /var/tmp/ccGl3YZR.s
> f771: warning: -Wuninitialized is not supported without -O
> GNU F77 version 2.95.2 19991024 (release) (hppa2.0-hp-hpux10.20)
> compiled by GNU C version 2.95.2 19991024 (release).
> GNU Fortran Front End version 0.5.25 19991024 (release)
> test:
> g77: Internal compiler error: program f771 got fatal signal 11
>
>
> Without the comment-sign in the DEFAULT-case everything seems to go
> right, but then the symbol table looks like
>
> nm SOLVT.o
> 00000000 t $CODE$
> U $global$
> U L$0003
> 00000000 t L$C0000
> 00000004 t L$C0001
> 40000000 d __g77_cilist_0___0
> U do_lio
> U e_wsle
> U s_wsle
> 00000000 T test_
>
> Here the reference
> U L$0003
> make trouble when the routine will be linked into another program,
> because the call to L$0003 cannot be solved
>
>
> If Optimization is used, nm SOLVT.o looks like
>
> nm SOLVT.o
> 40000000 d __g77_cilist_0___0
> 00000000 T test_
>
> which is OK.
>
>
> Information about the g77-version are given above
>
> Operating System is HPX-10.20. Couldn't tell about other OS :-(
>
>
> Olaf
>
> --
>
> Olaf Michelsson mailto:michelsson@e-technik.tu-ilmenau.de
> Faculty E/I Dept. of Theoretical Electrical Engineering
> Technical University of Ilmenau, Germany