Bug 38735 - [4.4 Regresssion] Default BLANK= mode for internal units is wrong
Summary: [4.4 Regresssion] Default BLANK= mode for internal units is wrong
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libfortran (show other bugs)
Version: 4.4.0
: P4 normal
Target Milestone: 4.4.0
Assignee: Jerry DeLisle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-05 21:33 UTC by Jerry DeLisle
Modified: 2009-01-06 00:30 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerry DeLisle 2009-01-05 21:33:06 UTC
With Dominique's test case:

character(15) :: str="+ .339  567+2"
real :: x
read(str,'(F15.6)') x
print *, x
read(str,'(G15.7)') x
print *, x
end

Current trunk yields:

$ ./a.out 
   33.956699    
  0.33899999    

It should be:

$ ./a.out 
   33.95670    
   33.95670
Comment 1 Jerry DeLisle 2009-01-05 21:43:14 UTC
From the standard:

"an internal file or a preconnected file that has not been opened is treated as if the file had been opened with BLANK = 'NULL'."

Patch on its way.

This is a regression from 4.3.
Comment 2 Jerry DeLisle 2009-01-05 22:55:44 UTC
Subject: Bug 38735

Author: jvdelisle
Date: Mon Jan  5 22:55:15 2009
New Revision: 143102

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143102
Log:
2009-01-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/38735
	* io/unit.c (get_internal_unit): Set default BLANK= status to NULL for
	internal units.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/io/unit.c

Comment 3 Jerry DeLisle 2009-01-05 22:57:41 UTC
Subject: Bug 38735

Author: jvdelisle
Date: Mon Jan  5 22:57:30 2009
New Revision: 143103

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143103
Log:
2009-01-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/38735
	* gfortran.dg/fmt_bz_bn.f: Update test.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/fmt_bz_bn.f

Comment 4 Jerry DeLisle 2009-01-06 00:30:56 UTC
Fixed on trunk