Bug 44292 - [libgfortran ABI breakage] Increase internal size of RECL= of the OPEN statement
Summary: [libgfortran ABI breakage] Increase internal size of RECL= of the OPEN statement
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks: 53796 56818 29602
  Show dependency treegraph
 
Reported: 2010-05-27 12:47 UTC by Tobias Burnus
Modified: 2014-03-30 18:08 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-05-30 05:38:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2010-05-27 12:47:32 UTC
libgfortran/io/io.h defines the "struct st_parameter_open" with
  GFC_INTEGER_4 recl_in;

However, the Fortran 95/2003/2008 standard allows any kind of integer expression and not only the default type. As http://gcc.gnu.org/ml/fortran/2010-05/msg00302.html shows, gfortran currently fails if the RECL= is larger than 2 GB.

Expected: The size is increased to GFC_INTEGER_8 to allow large-record access.

See also http://gcc.gnu.org/wiki/LibgfortranAbiCleanup
Comment 1 Thomas Koenig 2010-05-29 22:20:03 UTC
Confirmed.
Comment 2 Jerry DeLisle 2010-05-30 05:38:00 UTC
I would like to work this one.
Comment 3 Jerry DeLisle 2010-06-06 06:01:14 UTC
I have managed a patch that writes one very big record as in the test case.  I don't have sufficient memory to actually test a read.

It should be noted that the record length stored in gfc_unit which is created at runtime is a 64 bit value already.  The front-end changes needed to support large record lengths is almost trivial.

On the library side, writing is fairly simple as well.  Reading is a little bit more complicated.  Hopefully soon I will post a partial patch (or maybe even a complete but untested one)  I know Steve has a machine with lots of RAM, is there anyone else who would like to help with testing this? 
Comment 4 Tobias Burnus 2010-06-30 08:08:40 UTC
See also: PR 29602