public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/22412] New: Fortran B edit descriptor error
@ 2005-07-11 18:08 dje at gcc dot gnu dot org
  2005-07-11 18:09 ` [Bug libfortran/22412] " dje at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-07-11 18:08 UTC (permalink / raw)
  To: gcc-bugs

The negative-z-descriptor.f90 test for PR 22217 fails on the statement 
using '(B65)' format with Fortran runtime error: Error 0.  The error occurs in 
list_read.c:next_char() when salloc_r returns NULL.

Leading up to this point, transfer.c:formatted_transfer() was invoked with 
format B.  As with the previous format statements, the function calls 
unget_format(f), which places the format into the saved_format buffer.

Upon return from the I/O, finalize_transfer() is called leading to 
namelist_read().  The calls to next_char() step through a buffer of spaces 
reaching the end, NULL, causing the error.  The format string in the 
saved_format buffer is never seen.

-- 
           Summary: Fortran B edit descriptor error
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dje at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-aix powerpc-darwin
  GCC host triplet: powerpc-aix powerpc-darwin
GCC target triplet: powerpc-aix powerpc-darwin


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


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

* [Bug libfortran/22412] Fortran B edit descriptor error
  2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
@ 2005-07-11 18:09 ` dje at gcc dot gnu dot org
  2005-07-11 18:28 ` dje at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-07-11 18:09 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org


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


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

* [Bug libfortran/22412] Fortran B edit descriptor error
  2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
  2005-07-11 18:09 ` [Bug libfortran/22412] " dje at gcc dot gnu dot org
@ 2005-07-11 18:28 ` dje at gcc dot gnu dot org
  2005-07-11 20:12 ` dje at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-07-11 18:28 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


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


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

* [Bug libfortran/22412] Fortran B edit descriptor error
  2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
  2005-07-11 18:09 ` [Bug libfortran/22412] " dje at gcc dot gnu dot org
  2005-07-11 18:28 ` dje at gcc dot gnu dot org
@ 2005-07-11 20:12 ` dje at gcc dot gnu dot org
  2005-07-11 20:53 ` dje at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-07-11 20:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dje at gcc dot gnu dot org  2005-07-11 20:08 -------
Something appears to be going wrong in io/transfer.c.  If I compile that file 
without optimization, the testcase passes, with optimization it fails.  I 
suspect it might be an uninitialized variable (ionml?) as opposed to 
miscompilation.

-- 


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


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

* [Bug libfortran/22412] Fortran B edit descriptor error
  2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-07-11 20:12 ` dje at gcc dot gnu dot org
@ 2005-07-11 20:53 ` dje at gcc dot gnu dot org
  2005-07-11 21:07 ` dje at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-07-11 20:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dje at gcc dot gnu dot org  2005-07-11 20:50 -------
transfer integer appears to be overwriting the variable ionml when operating 
on B edit descriptor.  Prior to the function, ionml is NULL, after the 
function, the value is 0x31313131.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-07-11 20:50:02
               date|                            |


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


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

* [Bug libfortran/22412] Fortran B edit descriptor error
  2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-07-11 20:53 ` dje at gcc dot gnu dot org
@ 2005-07-11 21:07 ` dje at gcc dot gnu dot org
  2005-07-11 22:02 ` dje at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-07-11 21:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dje at gcc dot gnu dot org  2005-07-11 20:53 -------
Killed when calling btoa() for conversion.

-- 


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


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

* [Bug libfortran/22412] Fortran B edit descriptor error
  2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-07-11 21:07 ` dje at gcc dot gnu dot org
@ 2005-07-11 22:02 ` dje at gcc dot gnu dot org
  2005-07-11 22:28 ` dje at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-07-11 22:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dje at gcc dot gnu dot org  2005-07-11 21:57 -------
btoa() is overwriting the buffer scratch.  Although btoa() is in write.c, the 
buffer scratch is defined in transfer.c, so optimizing transfer.c changes the 
placement of scratch and exposes the failure.

-- 


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


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

* [Bug libfortran/22412] Fortran B edit descriptor error
  2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-07-11 22:02 ` dje at gcc dot gnu dot org
@ 2005-07-11 22:28 ` dje at gcc dot gnu dot org
  2005-07-12  4:01 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-07-11 22:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dje at gcc dot gnu dot org  2005-07-11 22:02 -------
I'm pretty sure the problem is the line

p = scratch + sizeof (SCRATCH_SIZE) - 1;

SCRATCH_SIZE is the size of the buffer.  sizeof (SCRATCH_SIZE) probably is not 
what the author meant.

-- 


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


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

* [Bug libfortran/22412] Fortran B edit descriptor error
  2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-07-11 22:28 ` dje at gcc dot gnu dot org
@ 2005-07-12  4:01 ` cvs-commit at gcc dot gnu dot org
  2005-07-12  4:43 ` [Bug libfortran/22412] [4.0 only] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-12  4:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-07-12 03:27 -------
Subject: Bug 22412

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	dje@gcc.gnu.org	2005-07-12 03:27:41

Modified files:
	libgfortran    : ChangeLog 
	libgfortran/io : write.c 

Log message:
	PR libgfortran/22412
	* io/write.c (otoa): Bias p by SCRATCH_SIZE, not
	sizeof (SCRATCH_SIZE).
	(btoa): Same.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.260&r2=1.261
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/write.c.diff?cvsroot=gcc&r1=1.40&r2=1.41



-- 


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


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

* [Bug libfortran/22412] [4.0 only] Fortran B edit descriptor error
  2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-07-12  4:01 ` cvs-commit at gcc dot gnu dot org
@ 2005-07-12  4:43 ` pinskia at gcc dot gnu dot org
  2005-07-14 17:23 ` cvs-commit at gcc dot gnu dot org
  2005-07-14 17:40 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-12  4:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-12 04:41 -------
Fixed on the mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|powerpc-aix powerpc-darwin  |
   GCC host triplet|powerpc-aix powerpc-darwin  |
 GCC target triplet|powerpc-aix powerpc-darwin  |powerpc-aix, powerpc-darwin
            Summary|Fortran B edit descriptor   |[4.0 only] Fortran B edit
                   |error                       |descriptor error
   Target Milestone|---                         |4.0.2


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


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

* [Bug libfortran/22412] [4.0 only] Fortran B edit descriptor error
  2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2005-07-12  4:43 ` [Bug libfortran/22412] [4.0 only] " pinskia at gcc dot gnu dot org
@ 2005-07-14 17:23 ` cvs-commit at gcc dot gnu dot org
  2005-07-14 17:40 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-14 17:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-07-14 17:17 -------
Subject: Bug 22412

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	dje@gcc.gnu.org	2005-07-14 17:17:14

Modified files:
	libgfortran    : ChangeLog 
	libgfortran/io : write.c 

Log message:
	PR libgfortran/22412
	* io/write.c (otoa): Bias p by SCRATCH_SIZE, not
	sizeof (SCRATCH_SIZE).
	(btoa): Same.

Patches:
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.60&r2=1.163.2.61
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.9&r2=1.23.2.10



-- 


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


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

* [Bug libfortran/22412] [4.0 only] Fortran B edit descriptor error
  2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2005-07-14 17:23 ` cvs-commit at gcc dot gnu dot org
@ 2005-07-14 17:40 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-14 17:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-14 17:36 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2005-07-14 17:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-11 18:08 [Bug libfortran/22412] New: Fortran B edit descriptor error dje at gcc dot gnu dot org
2005-07-11 18:09 ` [Bug libfortran/22412] " dje at gcc dot gnu dot org
2005-07-11 18:28 ` dje at gcc dot gnu dot org
2005-07-11 20:12 ` dje at gcc dot gnu dot org
2005-07-11 20:53 ` dje at gcc dot gnu dot org
2005-07-11 21:07 ` dje at gcc dot gnu dot org
2005-07-11 22:02 ` dje at gcc dot gnu dot org
2005-07-11 22:28 ` dje at gcc dot gnu dot org
2005-07-12  4:01 ` cvs-commit at gcc dot gnu dot org
2005-07-12  4:43 ` [Bug libfortran/22412] [4.0 only] " pinskia at gcc dot gnu dot org
2005-07-14 17:23 ` cvs-commit at gcc dot gnu dot org
2005-07-14 17:40 ` pinskia 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).