public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/20755] New: gfortran - prints the same number with 1p4G12.3 two different ways
@ 2005-04-04 19:28 dir at lanl dot gov
  2005-04-05 10:22 ` [Bug fortran/20755] " fxcoudert at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dir at lanl dot gov @ 2005-04-04 19:28 UTC (permalink / raw)
  To: gcc-bugs

This is strange. With gfortran -2.500E-03 get printed two different ways
depending upon what is in the print list before it. g77 looks ok.

[dranta:~/tests/gfortran] dir% g77 -o print03 print03.f
[dranta:~/tests/gfortran] dir% print03
  -1.000E-02  -2.000E-02   1.000E-02   2.000E-02  -1.000E-03   0.500     
-2.500E-03  -2.000E-03
   1.000E-03   1.500E-03   2.500E-03   2.000E-03  -1.000E-03  -1.500E-03 
-2.500E-03  -2.000E-03
[dranta:~/tests/gfortran] dir% gfortran -o print03 print03.f
[dranta:~/tests/gfortran] dir% print03
  -1.000E-02  -2.000E-02   1.000E-02   2.000E-02  -1.000E-03   0.500     
-0.250E-02  -0.200E-02
   1.000E-03   1.500E-03   2.500E-03   2.000E-03  -1.000E-03  -1.500E-03 
-2.500E-03  -2.000E-03
STOP 0
[dranta:~/tests/gfortran] dir% cat print03.f
      program main
      dimension y(8)
      dimension x(8)
      data y/-.01,-.02,.01,.02,-0.100E-02,0.500,-0.250E-02,-0.200E-02/
      data x/0.100E-02,0.150E-02,0.250E-02,0.200E-02,
     .       -0.100E-02,-0.150E-02,-0.250E-02,-0.200E-02/
      write(6,2000)y
      write(6,2000)x
      stop
 2000 format (1p4G12.3,1p4G12.3)
      end

-- 
           Summary: gfortran - prints the same number with 1p4G12.3 two
                    different ways
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dir at lanl dot gov
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: powerpc-apple-darwin7.8.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20755


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/20755] gfortran - prints the same number with 1p4G12.3 two different ways
  2005-04-04 19:28 [Bug fortran/20755] New: gfortran - prints the same number with 1p4G12.3 two different ways dir at lanl dot gov
@ 2005-04-05 10:22 ` fxcoudert at gcc dot gnu dot org
  2005-04-05 11:47 ` [Bug libfortran/20755] " fxcoudert at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-04-05 10:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-04-05 10:21 -------
Confirmed. Further reduced test case is:

$ cat pr20775.f 
      write (*,2000) 0.0, 0.02
      write (*,2000) 0.01, 0.02
 2000 format (1P2G12.3)
      end

$ gfortran pr20775.f && ./a.out 
    0.00       0.200E-01
   1.000E-02   2.000E-02

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-05 10:21:40
               date|                            |
            Summary|gfortran - prints the same  |gfortran - prints the same
                   |number with 1p4G12.3 two    |number with 1p4G12.3 two
                   |different ways              |different ways


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20755


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libfortran/20755] gfortran - prints the same number with 1p4G12.3 two different ways
  2005-04-04 19:28 [Bug fortran/20755] New: gfortran - prints the same number with 1p4G12.3 two different ways dir at lanl dot gov
  2005-04-05 10:22 ` [Bug fortran/20755] " fxcoudert at gcc dot gnu dot org
@ 2005-04-05 11:47 ` fxcoudert at gcc dot gnu dot org
  2005-04-05 14:21 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-04-05 11:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-04-05 11:46 -------
Patch proposed here: http://gcc.gnu.org/ml/fortran/2005-04/msg00083.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
          Component|fortran                     |libfortran
   GCC host triplet|powerpc-apple-darwin7.8.0   |
           Keywords|                            |patch


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20755


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libfortran/20755] gfortran - prints the same number with 1p4G12.3 two different ways
  2005-04-04 19:28 [Bug fortran/20755] New: gfortran - prints the same number with 1p4G12.3 two different ways dir at lanl dot gov
  2005-04-05 10:22 ` [Bug fortran/20755] " fxcoudert at gcc dot gnu dot org
  2005-04-05 11:47 ` [Bug libfortran/20755] " fxcoudert at gcc dot gnu dot org
@ 2005-04-05 14:21 ` cvs-commit at gcc dot gnu dot org
  2005-04-05 14:25 ` cvs-commit at gcc dot gnu dot org
  2005-04-05 14:34 ` fxcoudert at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-05 14:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-05 14:20 -------
Subject: Bug 20755

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fxcoudert@gcc.gnu.org	2005-04-05 14:20:11

Modified files:
	gcc/testsuite  : ChangeLog 
	libgfortran    : ChangeLog 
	libgfortran/io : write.c 
Added files:
	gcc/testsuite/gfortran.dg: pr20755.f 

Log message:
	PR libfortran/20755
	* write.c (write_float): A G edit descriptor may locally change
	the scale factor, but it needs to be restored afterwards.
	
	* gfortran.dg/pr20755.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5283&r2=1.5284
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr20755.f.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.181&r2=1.182
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/write.c.diff?cvsroot=gcc&r1=1.30&r2=1.31



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20755


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libfortran/20755] gfortran - prints the same number with 1p4G12.3 two different ways
  2005-04-04 19:28 [Bug fortran/20755] New: gfortran - prints the same number with 1p4G12.3 two different ways dir at lanl dot gov
                   ` (2 preceding siblings ...)
  2005-04-05 14:21 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-05 14:25 ` cvs-commit at gcc dot gnu dot org
  2005-04-05 14:34 ` fxcoudert at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-05 14:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-05 14:24 -------
Subject: Bug 20755

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	fxcoudert@gcc.gnu.org	2005-04-05 14:24:39

Modified files:
	gcc/testsuite  : ChangeLog 
	libgfortran    : ChangeLog 
	libgfortran/io : write.c 
Added files:
	gcc/testsuite/gfortran.dg: pr20755.f 

Log message:
	PR libfortran/20755
	* write.c (write_float): A G edit descriptor may locally change
	the scale factor, but it needs to be restored afterwards.
	
	* gfortran.dg/pr20755.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.101&r2=1.5084.2.102
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr20755.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.14&r2=1.163.2.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/write.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.23.2.5&r2=1.23.2.6



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20755


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libfortran/20755] gfortran - prints the same number with 1p4G12.3 two different ways
  2005-04-04 19:28 [Bug fortran/20755] New: gfortran - prints the same number with 1p4G12.3 two different ways dir at lanl dot gov
                   ` (3 preceding siblings ...)
  2005-04-05 14:25 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-05 14:34 ` fxcoudert at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-04-05 14:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-04-05 14:33 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20755


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-04-05 14:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-04 19:28 [Bug fortran/20755] New: gfortran - prints the same number with 1p4G12.3 two different ways dir at lanl dot gov
2005-04-05 10:22 ` [Bug fortran/20755] " fxcoudert at gcc dot gnu dot org
2005-04-05 11:47 ` [Bug libfortran/20755] " fxcoudert at gcc dot gnu dot org
2005-04-05 14:21 ` cvs-commit at gcc dot gnu dot org
2005-04-05 14:25 ` cvs-commit at gcc dot gnu dot org
2005-04-05 14:34 ` fxcoudert at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).