Bug 19071 - complex formatted output has too many items
Summary: complex formatted output has too many items
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:
 
Reported: 2004-12-18 19:20 UTC by Thomas Koenig
Modified: 2004-12-24 01:34 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-12-20 16:10:36


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Koenig 2004-12-18 19:20:39 UTC
$ cat cio.f
      program cio
      complex a
      a = cmplx(1.0, 2.0)
      print '(1P,E13.5)',a
      end
$ gfortran cio.f
$ ./a.out
  1.00000E+00  2.00000E+00
$ g77 cio.f
$ ./a.out
  1.00000E+00
  2.00000E+00
$ gfortran -v
Reading specs from /home/ig25/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --prefix=/home/ig25 --enable-languages=c,c++,f95
Thread model: posix
gcc version 4.0.0 20041218 (experimental)

Possibly related to PR 10964.
Comment 1 Thomas Koenig 2004-12-18 19:21:54 UTC
What I meant was that the bug is possibly related to PR 19064.
Comment 2 Bud Davis 2004-12-24 00:14:29 UTC
patch here


http://gcc.gnu.org/ml/fortran/2004-12/msg00224.html
Comment 3 GCC Commits 2004-12-24 00:29:20 UTC
Subject: Bug 19071

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bdavis@gcc.gnu.org	2004-12-24 00:29:08

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

Log message:
	2004-12-23  Bud Davis  <bdavis9659@comcast.net>
	
	PR fortran/19071
	* io/tranfer.c (formatted_transfer): moved check for
	format reversion inside the processing loop.
	
	* gfortran.dg/complex_write.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/complex_write.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4813&r2=1.4814
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.140&r2=1.141
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&r1=1.22&r2=1.23

Comment 4 Andrew Pinski 2004-12-24 01:34:18 UTC
Fixed.