public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/13919] New: Runtime 'internal error' in IO on i686-pc-linux-gnu only
@ 2004-01-29 11:17 Mart dot Rentmeester at sci dot kun dot nl
  2004-01-29 15:40 ` [Bug libfortran/13919] [gfortran] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Mart dot Rentmeester at sci dot kun dot nl @ 2004-01-29 11:17 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-03-24 16:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-29 11:17 [Bug fortran/13919] New: Runtime 'internal error' in IO on i686-pc-linux-gnu only Mart dot Rentmeester at sci dot kun dot nl
2004-01-29 15:40 ` [Bug libfortran/13919] [gfortran] " pinskia at gcc dot gnu dot org
2004-02-03 16:04 ` reichelt at gcc dot gnu dot org
2004-02-28 14:53 ` bdavis9659 at comcast dot net
2004-03-24 12:14 ` cvs-commit at gcc dot gnu dot org
2004-03-24 16:01 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).