Bug 175393 - gfotran internal write fails after internal read
gfotran internal write fails after internal read
Product: Fedora
Classification: Fedora
Component: gcc4 (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2005-12-09 13:44 EST by David Mastronarde
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.1.0-0.6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-12-12 09:50:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Mastronarde 2005-12-09 13:44:56 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
After an internal read from a character string just big enough to hold a number,
an internal write to a longer format gives an End of record error.

      character*80 card
      real*4 xnum
      character*9 tim
      character*10 packtime
      card = '23 45 78'
      packtime = '123403.123'
      print *,'before write'
101   format(a2,'-')         ! It runs if format is just a2
      read(card(1:2),*)XNUM  ! It runs if longer string than 1:2 is given
      print *,'after read'
      print *,'after write'
      call exit(0)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Compile above program,  gfortran -o readtst readtst.f
2. Run program

Actual Results:  [druid] blend 334 % gfortran -o readtst readtst.f
[druid] blend 335 % readtst
 before write
 after read
At line 13 of file readtst.f
Fortran runtime error: End of record

Expected Results:  [druid] blend 336 % g77 -o readtst readtst.f
[druid] blend 337 % readtst
 before write
 after read
 after write

Additional info:

This does not fail on Mac OSX 10.4 with:
gcc version 4.1.0 20051026 (experimental)

So maybe it is fixed already, or maybe it is system dependent
Comment 1 Jakub Jelinek 2005-12-12 09:50:57 EST
Works just fine in gcc-gfortran-4.1.0-0.6 (in Fedora development).
There are several fixes that haven't been applied to 4.0.x and probably aren't
going to be.

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