Bug 175648 - gfortran read does not take , for default on one entry
gfortran read does not take , for default on one entry
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: gcc4 (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-13 12:43 EST by David Mastronarde
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: 2005-12-15 04:35:03 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 25419 None None None Never

  None (edit)
Description David Mastronarde 2005-12-13 12:43:02 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:
When there is a read statement expecting a single entry and a single
comma is entered, the read expects more input.

The test program is:

      stuff = 1
      stuff2 = 2
      write(*,'(1x,a,$)')'Enter 2 somethings: '
      read(5,*)stuff,stuff2
      write(*,'(1x,a,$)')'Enter something: '
      read(5,*)stuff
      call exit(0)
      end

[ashtray] image 205 % gfortran -o inputbug inputbug.f
[ashtray] image 206 % ./inputbug
 Enter 2 somethings: ,,
 Enter something: ,
,
/

[ashtray] image 207 %

It does not accept a , as a default entry for a single number, although two 
commas work when two numbers are expected.  Once it gets on comma it even refuses a / until a second return is entered.




Version-Release number of selected component (if applicable):
gcc-gfortran-4.0.2-8.fc4

How reproducible:
Always

Steps to Reproduce:
1. compile program 
2. run program, enter ,, then ,
3.
  

Actual Results:  Failure to accept , on second input

Expected Results:  [ashtray] image 208 % g77 -o inputbug inputbug.f
[ashtray] image 209 % ./inputbug
 Enter 2 somethings: ,,
 Enter something: ,
[ashtray] image 210 % 


Additional info:

Also fails on Mac OSX 10.4
gcc version 4.1.0 20051026 (experimental)

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