Bug 177395 - SEGV with fortran compiled code
SEGV with fortran compiled code
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-10 05:05 EST by Alexander Täschner
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-17 09:32:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 25818 None None None Never

  None (edit)
Description Alexander Täschner 2006-01-10 05:05:19 EST
One of the math testcases of the CERNLIB crashes with a segmentation fault
when compiled using gfortran 4.1.0-0.14, but not with 4.0.2-8.
An minimal testcase is given below:

$ cat tsbvsl.f
      PROGRAM TSBVSL
        CALL NRANIN(54321.)
      END

      SUBROUTINE NRAN(VECTOR,N)
       DIMENSION VECTOR(N)
      DO I=1,N
      VECTOR(I) = RNDM(I)
      END DO
      RETURN
      ENTRY NRANIN (V)
      CALL RDMIN(V)
      RETURN
      END

      SUBROUTINE RDMIN(V)
      END

      REAL FUNCTION RNDM(I)
      RNDM=I
      END
$ gfortran -g -O tsbvsl.f -o tsbsvsl
$ ./tsbsvsl
Segmentation fault


The backtrace gives:


$ gdb ./tsbsvsl
GNU gdb Red Hat Linux (6.3.0.0-1.84rh)
[...]
(gdb) r
Starting program: /home/taschna/tests/tsbsvsl
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0x663000

Program received signal SIGSEGV, Segmentation fault.
master.0.nran (__entry=1, v=0x80485fc, n=0x0, vector=0x0) at tsbvsl.f:14
14            END
Current language:  auto; currently fortran
(gdb) bt
#0  master.0.nran (__entry=1, v=0x80485fc, n=0x0, vector=0x0) at tsbvsl.f:14
#1  0x080484e0 in nranin_ (v=0x80485fc) at tsbvsl.f:11
#2  0x08048515 in MAIN__ () at tsbvsl.f:2
#3  0x08048543 in main ()
Comment 1 Jakub Jelinek 2006-01-17 09:32:26 EST
Even GCC 4.0.x is buggy, just the optimizations aren't aggressive enough
to exhibit it.  Tracking upstream.

Note You need to log in before you can comment on or make changes to this bug.