[Bug fortran/37974] New: gfortran runtime segmentation fault

deji_aking at yahoo dot ca gcc-bugzilla@gcc.gnu.org
Fri Oct 31 02:07:00 GMT 2008


Using Gfortran, I'm getting a segmentation fault from running a code which
reduces to the following;
...
   PROGRAM seg_main
   INTEGER :: ip
   real :: sig

        ip = 26314400
        call seg_sub(ip, sig, 1)
        write(*,*) 'sig is', sig
   END PROGRAM

   SUBROUTINE seg_sub(ip, p, kind0)

      implicit none
      integer ip, kind0
      real p

      kind0 = 2 - 1
      p = ip

      return
   END SUBROUTINE
...
I'm not sure if the code violates some fortran standards, although it seems
valid to me. But I think gfortran should give some warning or error messages
instead of just segfaulting. The code works fine with pgf90 on Linux and xlf on
AIX, but similarly segfault with ifort on Linux.


-- 
           Summary: gfortran runtime segmentation fault
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: deji_aking at yahoo dot ca


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37974



More information about the Gcc-bugs mailing list