Bug 20086 - gfortran print routine has problem with the character 'h'
Summary: gfortran print routine has problem with the character 'h'
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libfortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: patch
Depends on:
Blocks: 19292
  Show dependency treegraph
 
Reported: 2005-02-19 18:08 UTC by Dale Ranta
Modified: 2005-02-22 04:02 UTC (History)
1 user (show)

See Also:
Host: powerpc-apple-darwin7.8.0
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-02-19 18:15:51


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dale Ranta 2005-02-19 18:08:05 UTC
On the Macintosh, the gfortran print routine drops the character follow an 'h'
in an output string. This happens in hundreds of cases in my program's output.
Here is a simple example -

[dir:~/tests/gfortran] dir% gfortran -o print print.f
[dir:~/tests/gfortran] dir% print
  stiffness reformed for hllo hllo)
  stiffness reformed for ths hghstep)
STOP 0
[dir:~/tests/gfortran] dir% cat print.f
      program main
      write(*,2090)
      write(*,2070)
      stop

 2070  format (2x,37hstiffness reformed for this high step)
 2090  format (2x,34hstiffness reformed for hello hello)

      end
Comment 1 Andrew Pinski 2005-02-19 18:15:51 UTC
Confirmed, I really thought I saw this before.
Comment 2 Bud Davis 2005-02-19 21:58:27 UTC
patch here:


http://gcc.gnu.org/ml/fortran/2005-02/msg00177.html
Comment 3 CVS Commits 2005-02-22 03:26:33 UTC
Subject: Bug 20086

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bdavis@gcc.gnu.org	2005-02-22 03:26:26

Modified files:
	gcc/testsuite  : ChangeLog 
	libgfortran    : ChangeLog 
	libgfortran/io : transfer.c 
Added files:
	gcc/testsuite/gfortran.dg: pr20086.f90 

Log message:
	2004-02-21  Bud Davis  <bdavis@gfortran.org>
	
	PR fortran/20086
	* io/transfer.c (write_constant_string): accept an 'h' as
	the start of a hollerith format string.
	
	2005-02-21  Bud Davis  <bdavis9659@comcast.net>
	
	PR fortran/20086
	* gfortran.dg/pr20086.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5064&r2=1.5065
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr20086.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.161&r2=1.162
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&r1=1.31&r2=1.32

Comment 4 Andrew Pinski 2005-02-22 04:02:35 UTC
Fixed, thanks for your report (and hopefully the other ones will be looked at very soon).