Bug 175648 - gfortran read does not take , for default on one entry
Summary: gfortran read does not take , for default on one entry
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc4
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-13 17:43 UTC by David Mastronarde
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-12-15 09:35:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 25419 0 None None None Never

Description David Mastronarde 2005-12-13 17:43:02 UTC
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.