public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/40714] New: Fortran runtime error: Invalid argument
@ 2009-07-10 20:48 michael dot a dot richmond at nasa dot gov
2009-07-10 21:17 ` [Bug fortran/40714] " dominiq at lps dot ens dot fr
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2009-07-10 20:48 UTC (permalink / raw)
To: gcc-bugs
This bug occurs on Sparc Linux and HP-PA Linux, but not i686 or x86_64. I
believe it is generic to big endian processors.
When I compile and run the program listed below I get the message:
At line 5 of file z.f90 (unit = 32, file = 'fort.32')
Fortran runtime error: Invalid argument
PROGRAM test
OPEN(UNIT=32,FILE="fort.32",STATUS="NEW",ACCESS="SEQUENTIAL",FORM="UNFORMATTED")
READ(32,END=100)
100 CONTINUE
WRITE (32)
END PROGRAM test
--
Summary: Fortran runtime error: Invalid argument
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot a dot richmond at nasa dot gov
GCC build triplet: sparc-unknown-linux-gnu
GCC host triplet: sparc-unknown-linux-gnu
GCC target triplet: sparc-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
@ 2009-07-10 21:17 ` dominiq at lps dot ens dot fr
2009-07-11 2:13 ` jvdelisle at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-07-10 21:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dominiq at lps dot ens dot fr 2009-07-10 21:16 -------
Confirmed on (powerpc|i686)-apple-darwin9 with -m32 or -m64. It is a
regression: it works with 4.2.3, 4.3.3, 4.4.0, but not with 4.4.1 (revision
147910) nor with trunk.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
2009-07-10 21:17 ` [Bug fortran/40714] " dominiq at lps dot ens dot fr
@ 2009-07-11 2:13 ` jvdelisle at gcc dot gnu dot org
2009-07-11 15:15 ` [Bug fortran/40714] [4.4, 4.5 Regression] " jvdelisle at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-11 2:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2009-07-11 02:13 -------
I will take this one on.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-07-11 02:13:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4, 4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
2009-07-10 21:17 ` [Bug fortran/40714] " dominiq at lps dot ens dot fr
2009-07-11 2:13 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-11 15:15 ` jvdelisle at gcc dot gnu dot org
2009-07-11 17:16 ` jvdelisle at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-11 15:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2009-07-11 15:15 -------
Marked as regression. Not platform specific. I confirmed this on x86-64
Linux.
We have an illegal seek in transfer.c (next_record_w_unf) at line 2824.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.4.1 4.5.0
Known to work| |4.3.4
Summary|Fortran runtime error: |[4.4, 4.5 Regression]
|Invalid argument |Fortran runtime error:
| |Invalid argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4, 4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (2 preceding siblings ...)
2009-07-11 15:15 ` [Bug fortran/40714] [4.4, 4.5 Regression] " jvdelisle at gcc dot gnu dot org
@ 2009-07-11 17:16 ` jvdelisle at gcc dot gnu dot org
2009-07-15 7:31 ` steven at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-11 17:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2009-07-11 17:16 -------
Another aspect of this bug. If we do this:
PROGRAM test
OPEN(UNIT=32,FILE="fort.32",STATUS="NEW",ACCESS="SEQUENTIAL",FORM="UNFORMATTED")
!READ(32,END=100)
100 CONTINUE
WRITE (32)
END PROGRAM test
We get:
$ gfc pr40714.f90
$ ./a.out
$ xxd fort.32
0000000: 0000 0000 0000 0000 0000 0000 ............
The correct result should be:
$ gfc43 -static pr40714.f90
$ ./a.out
$ xxd fort.32
0000000: 0000 0000 0000 0000 ........
So we need to correctly handle both error recovery and empty writes.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4, 4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (3 preceding siblings ...)
2009-07-11 17:16 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-15 7:31 ` steven at gcc dot gnu dot org
2009-07-15 7:39 ` burnus at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-07-15 7:31 UTC (permalink / raw)
To: gcc-bugs
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4, 4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (4 preceding siblings ...)
2009-07-15 7:31 ` steven at gcc dot gnu dot org
@ 2009-07-15 7:39 ` burnus at gcc dot gnu dot org
2009-07-15 17:20 ` jb at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-15 7:39 UTC (permalink / raw)
To: gcc-bugs
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|sparc-unknown-linux-gnu |
GCC host triplet|sparc-unknown-linux-gnu |
GCC target triplet|sparc-unknown-linux-gnu |
Priority|P3 |P4
Target Milestone|4.4.2 |4.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4, 4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (5 preceding siblings ...)
2009-07-15 7:39 ` burnus at gcc dot gnu dot org
@ 2009-07-15 17:20 ` jb at gcc dot gnu dot org
2009-07-15 21:42 ` jb at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jb at gcc dot gnu dot org @ 2009-07-15 17:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jb at gcc dot gnu dot org 2009-07-15 17:19 -------
I don't get it; for some reason bytes_left_subrecord has been set to 0, hence
the seek gets messed up.
--
jb at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jb at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4, 4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (6 preceding siblings ...)
2009-07-15 17:20 ` jb at gcc dot gnu dot org
@ 2009-07-15 21:42 ` jb at gcc dot gnu dot org
2009-07-16 1:31 ` jvdelisle at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jb at gcc dot gnu dot org @ 2009-07-15 21:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jb at gcc dot gnu dot org 2009-07-15 21:42 -------
Ok, so the problem is that due to the EOF the first read hits, the
current_record marker is not properly reset to 0 at the end of the data
transfer, and from that it follows that stuff isn't correctly initialized at
the next I/O statement.
Trying to figure out where to properly place the reset.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4, 4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (7 preceding siblings ...)
2009-07-15 21:42 ` jb at gcc dot gnu dot org
@ 2009-07-16 1:31 ` jvdelisle at gcc dot gnu dot org
2009-07-16 3:23 ` jvdelisle at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-16 1:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jvdelisle at gcc dot gnu dot org 2009-07-16 01:31 -------
I was trying to do it in hit_eof after the return from the error. I have not
figured it out yet. I will keep trying, but hope you find it first.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4, 4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (8 preceding siblings ...)
2009-07-16 1:31 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-16 3:23 ` jvdelisle at gcc dot gnu dot org
2009-07-17 19:40 ` [Bug fortran/40714] [4.4/4.5 " jb at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-16 3:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2009-07-16 03:23 -------
Taking myself off of this one.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|jvdelisle at gcc dot gnu dot|unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4/4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (9 preceding siblings ...)
2009-07-16 3:23 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-17 19:40 ` jb at gcc dot gnu dot org
2009-07-19 23:10 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jb at gcc dot gnu dot org @ 2009-07-17 19:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jb at gcc dot gnu dot org 2009-07-17 19:40 -------
Subject: Bug 40714
Author: jb
Date: Fri Jul 17 19:40:23 2009
New Revision: 149757
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149757
Log:
When finalizing I/O transfer, set current_record to 0 before returning.
PR libfortran/40714
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/transfer.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4/4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (10 preceding siblings ...)
2009-07-17 19:40 ` [Bug fortran/40714] [4.4/4.5 " jb at gcc dot gnu dot org
@ 2009-07-19 23:10 ` jvdelisle at gcc dot gnu dot org
2009-07-19 23:23 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-19 23:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2009-07-19 23:10 -------
Subject: Bug 40714
Author: jvdelisle
Date: Sun Jul 19 23:10:22 2009
New Revision: 149795
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149795
Log:
2009-07-19 Janne Blomqvist <jb@gcc.gnu.org>
Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40714
* io/transfer.c (finalize_transfer): Set current_record to 0
before returning in case of error.
* io/open.c: Fix spelling in comment.
Modified:
branches/gcc-4_4-branch/libgfortran/ChangeLog
branches/gcc-4_4-branch/libgfortran/io/open.c
branches/gcc-4_4-branch/libgfortran/io/transfer.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4/4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (11 preceding siblings ...)
2009-07-19 23:10 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-19 23:23 ` jvdelisle at gcc dot gnu dot org
2009-07-19 23:26 ` jvdelisle at gcc dot gnu dot org
2009-07-19 23:44 ` jvdelisle at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-19 23:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jvdelisle at gcc dot gnu dot org 2009-07-19 23:22 -------
Subject: Bug 40714
Author: jvdelisle
Date: Sun Jul 19 23:22:37 2009
New Revision: 149796
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149796
Log:
2009-07-19 Janne Blomqvist <jb@gcc.gnu.org>
Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40714
* gfortran.dg/eof_3.f90: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/eof_3.f90
Modified:
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4/4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (12 preceding siblings ...)
2009-07-19 23:23 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-19 23:26 ` jvdelisle at gcc dot gnu dot org
2009-07-19 23:44 ` jvdelisle at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-19 23:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jvdelisle at gcc dot gnu dot org 2009-07-19 23:26 -------
Subject: Bug 40714
Author: jvdelisle
Date: Sun Jul 19 23:26:20 2009
New Revision: 149797
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149797
Log:
2009-07-19 Janne Blomqvist <jb@gcc.gnu.org>
Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40714
* gfortran.dg/eof_3.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/eof_3.f90
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/40714] [4.4/4.5 Regression] Fortran runtime error: Invalid argument
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
` (13 preceding siblings ...)
2009-07-19 23:26 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-19 23:44 ` jvdelisle at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-19 23:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jvdelisle at gcc dot gnu dot org 2009-07-19 23:44 -------
Fixed on 4.5.0 and 4.4.1. Thanks for bug report.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40714
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2009-07-19 23:44 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-10 20:48 [Bug fortran/40714] New: Fortran runtime error: Invalid argument michael dot a dot richmond at nasa dot gov
2009-07-10 21:17 ` [Bug fortran/40714] " dominiq at lps dot ens dot fr
2009-07-11 2:13 ` jvdelisle at gcc dot gnu dot org
2009-07-11 15:15 ` [Bug fortran/40714] [4.4, 4.5 Regression] " jvdelisle at gcc dot gnu dot org
2009-07-11 17:16 ` jvdelisle at gcc dot gnu dot org
2009-07-15 7:31 ` steven at gcc dot gnu dot org
2009-07-15 7:39 ` burnus at gcc dot gnu dot org
2009-07-15 17:20 ` jb at gcc dot gnu dot org
2009-07-15 21:42 ` jb at gcc dot gnu dot org
2009-07-16 1:31 ` jvdelisle at gcc dot gnu dot org
2009-07-16 3:23 ` jvdelisle at gcc dot gnu dot org
2009-07-17 19:40 ` [Bug fortran/40714] [4.4/4.5 " jb at gcc dot gnu dot org
2009-07-19 23:10 ` jvdelisle at gcc dot gnu dot org
2009-07-19 23:23 ` jvdelisle at gcc dot gnu dot org
2009-07-19 23:26 ` jvdelisle at gcc dot gnu dot org
2009-07-19 23:44 ` jvdelisle 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).