Bug in g77 frontend

Dr. H. Ramachandran hari@ipr.res.in
Sun Oct 21 21:53:00 GMT 2001


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I wish to report a g77 bug. Here are the details, as per your format

g77 version:
    g77 version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) (from
    FSF-g77 version 0.5.26 20000731 (Red Hat Linux 7.1 2.96-81))
    Driving: g77 -v -c -xf77-version /dev/null -xnone
    Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
    gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
     /usr/lib/gcc-lib/i386-redhat-linux/2.96/tradcpp0 -lang-fortran -v
    -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__
    -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux
    -Asystem(posix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386
    -D__i386__ -D__tune_i386__ /dev/null /dev/null
    GNU traditional CPP version 2.96 20000731 (Red Hat Linux 7.1
    2.96-81)
     /usr/lib/gcc-lib/i386-redhat-linux/2.96/f771 -fnull-version
    -quiet -dumpbase g77-version.f -version -fversion -o
    /tmp/ccaw8p8T.s /dev/null
    GNU F77 version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
    (i386-redhat-linux) compiled by GNU C version 2.96 20000731 (Red
    Hat Linux 7.1 2.96-81).
    GNU Fortran Front End version 0.5.26 20000731 (Red Hat Linux 7.1
    2.96-81)
     as -V -Qy -o /tmp/cce2YHaI.o /tmp/ccaw8p8T.s
     GNU assembler version 2.10.91 (i386-redhat-linux) using BFD
    version 2.10.91.0.2
     ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o
    /tmp/ccW4JnYw /tmp/cce2YHaI.o
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/crtbegin.o
    -L/usr/lib/gcc-lib/i386-redhat-linux/2.96
    -L/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../.. -lg2c -lm -lgcc
    -lc -lgcc /usr/lib/gcc-lib/i386-redhat-linux/2.96/crtend.o
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crtn.o
     /tmp/ccW4JnYw
     __G77_LIBF77_VERSION__: 0.5.26 20000731 (prerelease)
     @(#)LIBF77 VERSION 19991115
     __G77_LIBI77_VERSION__: 0.5.26 20000731 (prerelease)
     @(#) LIBI77 VERSION pjw,dmg-mods 19991115
     __G77_LIBU77_VERSION__: 0.5.26 20000731 (prerelease)
     @(#) LIBU77 VERSION 19980709

Fortran source code that causes the problem. (Extracted from a larger
project) This is in the form of a shell script that extracts the source
code and compiles (and crashes).
#!/bin/sh
cat >pic.f <<cendf
      PROGRAM pic
         IMPLICIT NONE
         LOGICAL phidumpstep    ! Write out the potential array to disk
         LOGICAL rhodumpstep    ! Write out the charge density to disk
         LOGICAL plotstep       ! Current timestep is a plotting timestep
         LOGICAL checkptstep    ! Do checkpointing
         LOGICAL calcdenstep
         LOGICAL calcpotstep
         LOGICAL calcmomstep
         LOGICAL calcphasestep
         LOGICAL calcdiststep
         REAL wantrho1
         REAL wantrho2
         REAL wantphi1
         REAL wantphi2
         REAL wantphase1
         REAL wantphase2
         REAL wantphase3

         REAL elapsed,dt,qsim,time,rho,phi
         INTEGER i,j,Nsteps,num(0:32),istep,Qtot,npnt(0:32)

         ! Get the system parameters
         CALL getvars

         ! Call initialization routines for the Poisson solver.
         CALL init_routines
         WRITE(*,*)'# dt=',dt,' qsim=',qsim

         CALL restart

         ! Main simulation loop.
         DO i=istep,Nsteps
            ! Check if this is a diagnostic step
            CALL ClassifyStep(i)

            ! Inject particles
            CALL inject_particles
            ! Interpolate from particles to get charge density
            CALL interp_rho
            IF( calcdenstep )THEN
               CALL qfull(Qtot)
               WRITE(*,*)'# i=',i,' t=',time,', Q=',Qtot,
     $              ', N*qsim=',qsim*num(0)
               IF( plotstep )THEN
                  CALL contourslice(wantrho1,rho,'rho')
                  CALL contourslice(wantrho2,rho,'rho')
               ENDIF
            ENDIF
            CALL calc_potential ! Calculate $\phi$ for the given $\rho$
            IF( calcpotstep )THEN
               IF( plotstep )THEN
                  CALL contourslice(wantphi1,phi,'phi')
                  CALL contourslice(wantphi2,phi,'phi')
               ENDIF
            ENDIF
            CALL calcEfld       ! Compute the Electric field at mesh points
            CALL push           ! Push the particles
            time=time+dt
            IF( plotstep .AND. calcphasestep )THEN
               CALL phase_space_plot(wantphase1,'phase space')
               CALL phase_space_plot(wantphase2,'phase space')
               CALL phase_space_plot(wantphase3,'phase space')
            ENDIF
            IF( calcdiststep )THEN
               WRITE(*,*)'#&',(npnt(j),j=0,npnt(0))
               WRITE(*,*)'#:',(num(j),j=0,npnt(0))
               CALL timeElapsed
            ENDIF

            IF( checkptstep )CALL checkpoint

         END DO
         CALL lastTime
         ! Do one final \E{rho} calculation.
         CALL interp_rho
         CALL finish_routines

         CLOSE(31)
      END PROGRAM pic
cendf
g77 -c -funroll-loops -ffortran-bounds-check -O2  pic.f
# end of shell script

COMMENT: g77 -c funroll-loops -O2 pic.f does not crash.
COMMENT: g77 -c -ffortran-bounds-check -O2 pic.f does not crash.

Text of error message:
      pic.f: In program `pic':
      pic.f:80: Internal error: Segmentation fault.
      Please submit a full bug report.
      See <URL: http://bugzilla.redhat.com/bugzilla/ > for instructions.

Machine information: 
      Celeron 330 MHz with 4 GB Quantum Fireball IDE hard disk, 128 MB
      RAM.

Kernel version:
      vmlinuz-2.4.2-2

Compiler configuration information: rpm -q -info gcc-g77
Name: gcc-g77                      Relocations: (not relocateable)
Version: 2.96                              Vendor: Red Hat, Inc.
Release: 81                            Build Date: Fri 06 Apr 2001 
12:30:01 AM IST
Install date: Thu 02 Aug 2001 10:46:04 AM IST      Build Host: 
porky.devel.redhat.com
Group: Development/Languages         Source RPM: gcc-2.96-81.src.rpm
Size: 4070630                          License: GPL
Packager: Red Hat, Inc. < http://bugzilla.redhat.com/bugzilla >
URL: http://gcc.gnu.org
Summary: Fortran 77 support for gcc
Description:
The gcc-g77 package provides support for compiling Fortran 77
programs with the GNU gcc compiler.

Please inform me if you have patches for this problem.

Thanks

hari
- -- 
Dr. Hari Ramachandran                           W-10, extn 235
Institute for Plasma Research           email: hari@ipr.res.in
Bhat, Gandhinagar                tel: 91-79-3269001 to 3269015
India 382 428                               fax: 91-79-3269017
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE706YFmVraBokhpxURAnyoAJ45t8He7tP+zidYkuEclC/cCi8oxgCdG6sP
l/9VqPRuZVKrw+KsCA055YQ=
=V/Kd
-----END PGP SIGNATURE-----



More information about the Gcc-bugs mailing list