public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/20471] New: Segmentation fault on read after backspace and rewind
@ 2005-03-14 17:37 dir at lanl dot gov
  2005-03-15 22:58 ` [Bug libfortran/20471] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dir at lanl dot gov @ 2005-03-14 17:37 UTC (permalink / raw)
  To: gcc-bugs

Using the 03-13-05 Macintosh image of gfortran, I get this error -

[dranta:~/tests/gfortran] dir% gfortran -o backspace4 backspace4.f
[dranta:~/tests/gfortran] dir% backspace4
Segmentation fault
[dranta:~/tests/gfortran] dir% cat backspace4.f
      program main
      dimension x(100)
      n10=10
      write(3)n10,(x(n),n=1,n10)
      backspace 3
      rewind 3
      read(3)n10,(x(n),n=1,n10)
      stop
      end

-- 
           Summary: Segmentation fault on read after backspace and rewind
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libfortran
        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=20471


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

* [Bug libfortran/20471] Segmentation fault on read after backspace and rewind
  2005-03-14 17:37 [Bug libfortran/20471] New: Segmentation fault on read after backspace and rewind dir at lanl dot gov
@ 2005-03-15 22:58 ` pinskia at gcc dot gnu dot org
  2005-03-17  1:38 ` dir at lanl dot gov
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-15 22:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-15 22:58 -------
Confirmed, werid I don't get it with a newer gfortran on i686-pc-linux.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-03-15 22:58:12
               date|                            |


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


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

* [Bug libfortran/20471] Segmentation fault on read after backspace and rewind
  2005-03-14 17:37 [Bug libfortran/20471] New: Segmentation fault on read after backspace and rewind dir at lanl dot gov
  2005-03-15 22:58 ` [Bug libfortran/20471] " pinskia at gcc dot gnu dot org
@ 2005-03-17  1:38 ` dir at lanl dot gov
  2005-03-17 14:44 ` Thomas dot Koenig at online dot de
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dir at lanl dot gov @ 2005-03-17  1:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dir at lanl dot gov  2005-03-17 01:38 -------
The patches suggested in comment #2 under bug 20156 fixes bugs 20156, 20125 and
20471 on the macintosh and does not seem to cause any new problems.

-- 


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


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

* [Bug libfortran/20471] Segmentation fault on read after backspace and rewind
  2005-03-14 17:37 [Bug libfortran/20471] New: Segmentation fault on read after backspace and rewind dir at lanl dot gov
  2005-03-15 22:58 ` [Bug libfortran/20471] " pinskia at gcc dot gnu dot org
  2005-03-17  1:38 ` dir at lanl dot gov
@ 2005-03-17 14:44 ` Thomas dot Koenig at online dot de
  2005-03-31 20:32 ` fxcoudert at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-03-17 14:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Thomas dot Koenig at online dot de  2005-03-17 14:40 -------
(In reply to comment #2)
> The patches suggested in comment #2 under bug 20156 fixes bugs 20156, 20125 and
> 20471 on the macintosh and does not seem to cause any new problems.

Can you submit this as a regular patch?  The how-to is documented under
http://gcc.gnu.org/contribute.html.

Specifically, send the patch with appropriate ChangeLog entries and
test cases both to gcc-patches@gcc.gnu.org and fortran@gcc.gnu.org
so it can be reviewed.

Probably, for this size of patch, a short copyright disclaimer would
be OK.

Thomas


-- 


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


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

* [Bug libfortran/20471] Segmentation fault on read after backspace and rewind
  2005-03-14 17:37 [Bug libfortran/20471] New: Segmentation fault on read after backspace and rewind dir at lanl dot gov
                   ` (2 preceding siblings ...)
  2005-03-17 14:44 ` Thomas dot Koenig at online dot de
@ 2005-03-31 20:32 ` fxcoudert at gcc dot gnu dot org
  2005-04-01 15:28 ` fxcoudert at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-03-31 20:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-03-31 20:32 -------
Same patch also fixes PR 20068 (that is, all backspace bugs), but it does
introduce a regression (gfortran.fortran-torture/execute/backspace.f90).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
   Last reconfirmed|2005-03-15 22:58:12         |2005-03-31 20:32:36
               date|                            |


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


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

* [Bug libfortran/20471] Segmentation fault on read after backspace and rewind
  2005-03-14 17:37 [Bug libfortran/20471] New: Segmentation fault on read after backspace and rewind dir at lanl dot gov
                   ` (3 preceding siblings ...)
  2005-03-31 20:32 ` fxcoudert at gcc dot gnu dot org
@ 2005-04-01 15:28 ` fxcoudert at gcc dot gnu dot org
  2005-04-03  8:04 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-04-01 15:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-04-01 15:28 -------
Forget comment #4. The problem is in the testsuite file (I corrected it, this
test now FAILs, but will be fixed soon by Dale's patch).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2005-03-31 20:32:36         |2005-04-01 15:28:32
               date|                            |


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


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

* [Bug libfortran/20471] Segmentation fault on read after backspace and rewind
  2005-03-14 17:37 [Bug libfortran/20471] New: Segmentation fault on read after backspace and rewind dir at lanl dot gov
                   ` (4 preceding siblings ...)
  2005-04-01 15:28 ` fxcoudert at gcc dot gnu dot org
@ 2005-04-03  8:04 ` cvs-commit at gcc dot gnu dot org
  2005-04-03  8:08 ` cvs-commit at gcc dot gnu dot org
  2005-04-03  8:11 ` fxcoudert at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-03  8:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-03 08:04 -------
Subject: Bug 20471

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

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

Log message:
	PR libfortran/20068
	PR libfortran/20125
	PR libfortran/20156
	PR libfortran/20471
	
	* io/backspace.c (unformatted_backspace): Fix error in arithmetic.
	(st_backspace): When in WRITING mode, we flush and falling back
	into READING mode. In all cases, correctly position the stream.
	
	* gfortran.dg/backspace.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.90&r2=1.5084.2.91
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/backspace.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.13&r2=1.163.2.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/backspace.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.9&r2=1.9.12.1



-- 


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


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

* [Bug libfortran/20471] Segmentation fault on read after backspace and rewind
  2005-03-14 17:37 [Bug libfortran/20471] New: Segmentation fault on read after backspace and rewind dir at lanl dot gov
                   ` (5 preceding siblings ...)
  2005-04-03  8:04 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-03  8:08 ` cvs-commit at gcc dot gnu dot org
  2005-04-03  8:11 ` fxcoudert at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-03  8:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-03 08:07 -------
Subject: Bug 20471

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

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

Log message:
	PR libfortran/20068
	PR libfortran/20125
	PR libfortran/20156
	PR libfortran/20471
	
	* io/backspace.c (unformatted_backspace): Fix error in arithmetic.
	(st_backspace): When in WRITING mode, we flush and falling back
	into READING mode. In all cases, correctly position the stream.
	
	* gfortran.dg/backspace.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5270&r2=1.5271
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/backspace.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.180&r2=1.181
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/backspace.c.diff?cvsroot=gcc&r1=1.9&r2=1.10



-- 


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


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

* [Bug libfortran/20471] Segmentation fault on read after backspace and rewind
  2005-03-14 17:37 [Bug libfortran/20471] New: Segmentation fault on read after backspace and rewind dir at lanl dot gov
                   ` (6 preceding siblings ...)
  2005-04-03  8:08 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-03  8:11 ` fxcoudert at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-04-03  8:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-04-03 08:10 -------
Fixed.

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


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


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

end of thread, other threads:[~2005-04-03  8:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-14 17:37 [Bug libfortran/20471] New: Segmentation fault on read after backspace and rewind dir at lanl dot gov
2005-03-15 22:58 ` [Bug libfortran/20471] " pinskia at gcc dot gnu dot org
2005-03-17  1:38 ` dir at lanl dot gov
2005-03-17 14:44 ` Thomas dot Koenig at online dot de
2005-03-31 20:32 ` fxcoudert at gcc dot gnu dot org
2005-04-01 15:28 ` fxcoudert at gcc dot gnu dot org
2005-04-03  8:04 ` cvs-commit at gcc dot gnu dot org
2005-04-03  8:08 ` cvs-commit at gcc dot gnu dot org
2005-04-03  8:11 ` 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).