diff options
author | Toon Moene <toon@gcc.gnu.org> | 2003-03-24 21:20:20 +0000 |
---|---|---|
committer | Toon Moene <toon@gcc.gnu.org> | 2003-03-24 21:20:20 +0000 |
commit | c12741e91b24e423fbc0ce2ec6e74d83c85564f9 (patch) | |
tree | b9f050d127de9979e5f4eed1fe4b3d225e5afa2f | |
parent | 696fe23cb6a31a2fe5966fa8a0285b49fc88a0c8 (diff) | |
download | gcc-c12741e91b24e423fbc0ce2ec6e74d83c85564f9.zip gcc-c12741e91b24e423fbc0ce2ec6e74d83c85564f9.tar.gz gcc-c12741e91b24e423fbc0ce2ec6e74d83c85564f9.tar.bz2 |
re PR fortran/10197 (direct acces files not unformatted by default)
2003-03-24 Bud Davis <bdavis9659@comcast.net>
PR fortran/10197
* libI77/open.c (f_open): A DIRECT ACCESS file is
UNFORMATTED by default.
From-SVN: r64821
-rw-r--r-- | gcc/f/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/f/news.texi | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g77.f-torture/execute/10197.f | 15 | ||||
-rw-r--r-- | libf2c/ChangeLog | 6 | ||||
-rw-r--r-- | libf2c/libI77/open.c | 5 |
6 files changed, 38 insertions, 2 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 46c3309..1391a6d 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,8 @@ +2003-03-24 Toon Moene <toon@moene.indiv.nluug.nl> + + PR fortran/10197 + * news.texi: Document PR fortran/10197 fixed. + Sun Mar 23 23:43:45 2003 Mark Mitchell <mark@codesourcery.com> PR c++/7086 diff --git a/gcc/f/news.texi b/gcc/f/news.texi index 2194852..0d07df4 100644 --- a/gcc/f/news.texi +++ b/gcc/f/news.texi @@ -11,7 +11,7 @@ @c in the standalone derivations of this file (e.g. NEWS). @set copyrights-news 1995,1996,1997,1998,1999,2000,2001,2002,2003 -@set last-update-news 2003-02-20 +@set last-update-news 2003-03-24 @ifset DOC-NEWS @include root.texi @@ -191,6 +191,8 @@ Incorrect output with 0-based array of characters Double complex zero ** double precision number -> NaN instead of zero @item 9038 -ffixed-line-length-none -x f77-cpp-input gives: Warning: unknown register name line-length-none +@item 10197 +Direct access files not unformatted by default @end table @item Richard Henderson (@email{rth@@redhat.com}) analyzed and improved the handling diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cb6e097..1d4c2b4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-03-24 Bud Davis <bdavis9659@comcast.net> + + PR fortran/10197 + * g77.f-torture/execute/10197.f: New test. + 2003-03-24 Nathan Sidwell <nathan@codesourcery.com> PR c++/9898, c++/383 diff --git a/gcc/testsuite/g77.f-torture/execute/10197.f b/gcc/testsuite/g77.f-torture/execute/10197.f new file mode 100644 index 0000000..0fa81f6 --- /dev/null +++ b/gcc/testsuite/g77.f-torture/execute/10197.f @@ -0,0 +1,15 @@ + IMPLICIT NONE + LOGICAL ERROR + CHARACTER*12 FORM + DATA ERROR /.FALSE./ + DATA FORM /' '/ + OPEN(UNIT=60,ACCESS='DIRECT',STATUS='SCRATCH',RECL=255) + INQUIRE(UNIT=60,FORM=FORM) + IF (FORM.EQ.'UNFORMATTED') THEN + ERROR = .FALSE. + ELSE + ERROR = .TRUE. + ENDIF + CLOSE(UNIT=60) + IF (ERROR) CALL ABORT + END diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index fab2eb7..be09124 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,3 +1,9 @@ +2003-03-24 Bud Davis <bdavis9659@comcast.net> + + PR fortran/10197 + * libI77/open.c (f_open): A DIRECT ACCESS file is + UNFORMATTED by default. + Wed Mar 12 22:27:14 2003 Andreas Schwab <schwab@suse.de> * aclocal.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Avoid trailing /. in diff --git a/libf2c/libI77/open.c b/libf2c/libI77/open.c index 790f5d6..ac1e00e 100644 --- a/libf2c/libI77/open.c +++ b/libf2c/libI77/open.c @@ -148,7 +148,10 @@ f_open (olist * a) b->url = (int) a->orl; b->ublnk = a->oblnk && (*a->oblnk == 'z' || *a->oblnk == 'Z'); if (a->ofm == 0) - b->ufmt = 1; + if ((a->oacc) && (*a->oacc == 'D' || *a->oacc == 'd')) + b->ufmt = 0; + else + b->ufmt = 1; else if (*a->ofm == 'f' || *a->ofm == 'F') b->ufmt = 1; else |