* [Bug libfortran/31409] [4.1 4.2 4.3 regression] Reading after ERROR_SHORT_RECORD
2007-03-31 9:42 [Bug libfortran/31409] New: [4.1 4.2 4.3 regression] Reading after ERROR_SHORT_RECORD tkoenig at gcc dot gnu dot org
@ 2007-03-31 17:59 ` jvdelisle at gcc dot gnu dot org
2007-04-01 3:25 ` jvdelisle at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-03-31 17:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jvdelisle at gcc dot gnu dot org 2007-03-31 18:59 -------
The patch does not appear to fix this on 4.3
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31409
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/31409] [4.1 4.2 4.3 regression] Reading after ERROR_SHORT_RECORD
2007-03-31 9:42 [Bug libfortran/31409] New: [4.1 4.2 4.3 regression] Reading after ERROR_SHORT_RECORD tkoenig at gcc dot gnu dot org
2007-03-31 17:59 ` [Bug libfortran/31409] " jvdelisle at gcc dot gnu dot org
@ 2007-04-01 3:25 ` jvdelisle at gcc dot gnu dot org
2007-04-01 3:46 ` [Bug libfortran/31409] [4.1 4.2 " jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-04-01 3:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2007-04-01 04:25 -------
Created an attachment (id=13313)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13313&action=view)
Test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31409
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/31409] [4.1 4.2 regression] Reading after ERROR_SHORT_RECORD
2007-03-31 9:42 [Bug libfortran/31409] New: [4.1 4.2 4.3 regression] Reading after ERROR_SHORT_RECORD tkoenig at gcc dot gnu dot org
2007-03-31 17:59 ` [Bug libfortran/31409] " jvdelisle at gcc dot gnu dot org
2007-04-01 3:25 ` jvdelisle at gcc dot gnu dot org
@ 2007-04-01 3:46 ` jvdelisle at gcc dot gnu dot org
2007-04-18 4:23 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-04-01 3:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2007-04-01 04:45 -------
I believe gfortran 4.3 is correctly handling this test case. There should be
two error messages from trying to read the larger B(4) array from a record that
contains a smaller A(2) array, thus reading past end of record in those cases.
After the errors, gfortran positions correctly to read the next available
record.
Gfortran behavior matches ifort. It would be interesting to see what other
compilers do.
I have not checked gfortran 4.2 yet. However, reviewing the code in transfer.c
(read_block_direct) I suspect 4.2 is OK. The code we have now in 4.2 and 4.3
is as follows:
/* Let's make sure the file position is correctly set for the
next read statement. */
next_record_r_unf (dtp, 0);
us_read (dtp, 0);
generate_error (&dtp->common, ERROR_SHORT_RECORD, NULL);
return;
This is very similar to Georgy's patch with a call to next_record to correctly
position the file for the following record,
Clearly, from Georgy's data, 4.1.2 is failing
I think the fix we have now in 4.2 and 4.3 (or similar) should be backported to
the 4.1 branch.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.1 4.2 4.3 regression] |[4.1 4.2 regression]
|Reading after |Reading after
|ERROR_SHORT_RECORD |ERROR_SHORT_RECORD
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31409
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/31409] [4.1 4.2 regression] Reading after ERROR_SHORT_RECORD
2007-03-31 9:42 [Bug libfortran/31409] New: [4.1 4.2 4.3 regression] Reading after ERROR_SHORT_RECORD tkoenig at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-04-01 3:46 ` [Bug libfortran/31409] [4.1 4.2 " jvdelisle at gcc dot gnu dot org
@ 2007-04-18 4:23 ` jvdelisle at gcc dot gnu dot org
2007-04-18 5:45 ` [Bug libfortran/31409] [4.1 only, " fxcoudert at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-04-18 4:23 UTC (permalink / raw)
To: gcc-bugs
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31409
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/31409] [4.1 only, regression] Reading after ERROR_SHORT_RECORD
2007-03-31 9:42 [Bug libfortran/31409] New: [4.1 4.2 4.3 regression] Reading after ERROR_SHORT_RECORD tkoenig at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-04-18 4:23 ` jvdelisle at gcc dot gnu dot org
@ 2007-04-18 5:45 ` fxcoudert at gcc dot gnu dot org
2007-05-11 5:41 ` jvdelisle at gcc dot gnu dot org
2007-05-11 5:42 ` jvdelisle at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-04-18 5:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from fxcoudert at gcc dot gnu dot org 2007-04-18 06:45 -------
(In reply to comment #3)
> Gfortran behavior matches ifort. It would be interesting to see what other
> compilers do.
Sun does the same as gfortran and Intel.
> I have not checked gfortran 4.2 yet. However, reviewing the code in transfer.c
> (read_block_direct) I suspect 4.2 is OK.
I tested gfortran-4.2 and it has the same behavior as gfortran-mainline. 4.1.2
gives different results, however. I'm adding the outputs of different version
as an attached tar file.
> I think the fix we have now in 4.2 and 4.3 (or similar) should be backported to
> the 4.1 branch.
Keeping this open.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.1 4.2 regression] |[4.1 only, regression]
|Reading after |Reading after
|ERROR_SHORT_RECORD |ERROR_SHORT_RECORD
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31409
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/31409] [4.1 only, regression] Reading after ERROR_SHORT_RECORD
2007-03-31 9:42 [Bug libfortran/31409] New: [4.1 4.2 4.3 regression] Reading after ERROR_SHORT_RECORD tkoenig at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-04-18 5:45 ` [Bug libfortran/31409] [4.1 only, " fxcoudert at gcc dot gnu dot org
@ 2007-05-11 5:41 ` jvdelisle at gcc dot gnu dot org
2007-05-11 5:42 ` jvdelisle at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-05-11 5:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2007-05-11 06:40 -------
Subject: Bug 31409
Author: jvdelisle
Date: Fri May 11 05:40:37 2007
New Revision: 124612
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124612
Log:
2007-05-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/31409
* io/transfer.c (read_block_direct): Backport from 4.3 trunk.
Modified:
branches/gcc-4_1-branch/libgfortran/ChangeLog
branches/gcc-4_1-branch/libgfortran/io/transfer.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31409
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/31409] [4.1 only, regression] Reading after ERROR_SHORT_RECORD
2007-03-31 9:42 [Bug libfortran/31409] New: [4.1 4.2 4.3 regression] Reading after ERROR_SHORT_RECORD tkoenig at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-05-11 5:41 ` jvdelisle at gcc dot gnu dot org
@ 2007-05-11 5:42 ` jvdelisle at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-05-11 5:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2007-05-11 06:41 -------
Fixed on 4.1. Not a bug on 4.2 or 4.3
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31409
^ permalink raw reply [flat|nested] 8+ messages in thread