Bug 15332 - colon edit descriptor not handled correctly
colon edit descriptor not handled correctly
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: libfortran
tree-ssa
: P2 normal
: 4.0.0
Assigned To: Francois-Xavier Coudert
: patch, wrong-code
: 20037 (view as bug list)
Depends on:
Blocks: 19292 20037
  Show dependency treegraph
 
Reported: 2004-05-06 21:59 UTC by Tobias Schlüter
Modified: 2005-03-25 07:07 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-03-24 23:22:20


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Schlüter 2004-05-06 21:59:59 UTC
This program:
	i = 0; j = 1
	WRITE(*,100) i, j
	WRITE(*,100) i
 100    FORMAT("i =",i2,:,", j =",i2)
	END
should print:
i = 0, j = 1
i = 0
but it does print
i = 0, j = 1
i = 0, j =
instead, i.e. output doesn't stop after the colon edit descriptor. Most
interestingly fixing the apparent bug WRT this in format.c didn't help, even
though the code transfer.c triggers after this fix. I'm recording this here, so
that someone else can look at it, and so that I don't forget.
Comment 1 Andrew Pinski 2004-05-06 22:35:41 UTC
Confirmed.
Comment 2 Tobias Schlüter 2004-05-15 22:10:55 UTC
(In reply to comment #0)
> Most
> interestingly fixing the apparent bug WRT this in format.c didn't help, even
> though the code transfer.c triggers after this fix. 

I don't remember what the "apparent bug WRT" was, and I can't find it. Possibly
I just hallucinated when writing this.

Comment 3 Francois-Xavier Coudert 2005-03-24 22:23:33 UTC
*** Bug 20037 has been marked as a duplicate of this bug. ***
Comment 4 Francois-Xavier Coudert 2005-03-25 00:25:10 UTC
Patch here: http://gcc.gnu.org/ml/fortran/2005-03/msg00428.html
Comment 5 CVS Commits 2005-03-25 07:04:22 UTC
Subject: Bug 15332

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	fxcoudert@gcc.gnu.org	2005-03-25 07:04:10

Modified files:
	gcc/testsuite  : ChangeLog 
	libgfortran    : ChangeLog 
	libgfortran/io : format.c 
Added files:
	gcc/testsuite/gfortran.dg: pr15332.f 

Log message:
	PR libfortran/15332
	
	* io/format.c (parse_format_list): format node for colon edit
	descriptor needs a repeat counter set to 1.
	
	* gfortran.dg/pr15332.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.67&r2=1.5084.2.68
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr15332.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.163.2.9&r2=1.163.2.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/format.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.9&r2=1.9.12.1

Comment 6 CVS Commits 2005-03-25 07:04:34 UTC
Subject: Bug 15332

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fxcoudert@gcc.gnu.org	2005-03-25 07:04:27

Modified files:
	gcc/testsuite  : ChangeLog 
	libgfortran    : ChangeLog 
	libgfortran/io : format.c 
Added files:
	gcc/testsuite/gfortran.dg: pr15332.f 

Log message:
	PR libfortran/15332
	
	* io/format.c (parse_format_list): format node for colon edit
	descriptor needs a repeat counter set to 1.
	
	* gfortran.dg/pr15332.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5214&r2=1.5215
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr15332.f.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.176&r2=1.177
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/format.c.diff?cvsroot=gcc&r1=1.9&r2=1.10

Comment 7 Francois-Xavier Coudert 2005-03-25 07:07:18 UTC
Fixed.