[Bug fortran/13919] New: Runtime 'internal error' in IO on i686-pc-linux-gnu only

Mart dot Rentmeester at sci dot kun dot nl gcc-bugzilla@gcc.gnu.org
Thu Jan 29 11:17:00 GMT 2004


When I run the program below, and feed it a file with less
than 10 records (just a list of reals), i.e., the 'end=2'
redirection in the read statement should be followed,
generates an internal error on a linux pc (i686-pc-linux-gnu)
about recursive library calls not being allowed (see below).
However, when I remove the 'close(78)' line the internal
error mysteriously disappears.
On a hp pa-risc machine (hppa2.0w-hp-hpux11.11) this program
just runs as expected.

gfortran -dumpversion:
GNU Fortran 95 (GCC 3.5-tree-ssa 20040119 (merged 20040102))





Sample session:
############################################################

Give filename
Ppp
           1
           2
           3
           4
           5
At line 21 of file x.f
Internal Error: Recursive library calls not allowed

############################################################
      program phs

      implicit none
      integer n,r
      real e(10)
      character(10) file


      write(6,*) 'Give filename'
      read(5,*) file

      open(78,file=file)
      n = 0
 1    continue
          n = n + 1
          write(6,*) n
          if (n > 10) goto 3
          read(78,*,end=2) e(n)
          goto 1
 2        continue
          write(6,*) 'end reached'
 3    continue
      n = n - 1
      close(78)

      end
############################################################

-- 
           Summary: Runtime 'internal error' in IO on i686-pc-linux-gnu only
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Mart dot Rentmeester at sci dot kun dot nl
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



More information about the Gcc-bugs mailing list