]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/10197 (direct acces files not unformatted by default)
authorToon Moene <toon@gcc.gnu.org>
Mon, 24 Mar 2003 21:20:20 +0000 (21:20 +0000)
committerToon Moene <toon@gcc.gnu.org>
Mon, 24 Mar 2003 21:20:20 +0000 (21:20 +0000)
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

gcc/f/ChangeLog
gcc/f/news.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g77.f-torture/execute/10197.f [new file with mode: 0644]
libf2c/ChangeLog
libf2c/libI77/open.c

index 46c3309ca2257de45e4ae51f87e0e03bc2e705f2..1391a6d0ac7807d1e438fec82429ce74fbaee66a 100644 (file)
@@ -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
index 2194852f8d254b63e65cf21c105986be3b6275b7..0d07df41f0a2e06de381dc118b31b43f4930257b 100644 (file)
@@ -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
index cb6e0971f26176107f090e94160ade0deae0ca56..1d4c2b4955ea75a3308e4a6a1fbc8534cc46f0c0 100644 (file)
@@ -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 (file)
index 0000000..0fa81f6
--- /dev/null
@@ -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
index fab2eb7bebc907dfc5757d9ce2dee526a696eaa7..be091247888fb2f1d4beea5ed667b89954550e0a 100644 (file)
@@ -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
index 790f5d67098dc39f7be957b32cbd2e6e13c67017..ac1e00ec6deac631dd4b6d435b8c3a88d486b91f 100644 (file)
@@ -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