]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
io.c (gfc_resolve_open): RESOLVE_TAG access field as well.
authorJakub Jelinek <jakub@redhat.com>
Tue, 29 Nov 2005 12:00:01 +0000 (13:00 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 29 Nov 2005 12:00:01 +0000 (13:00 +0100)
* io.c (gfc_resolve_open): RESOLVE_TAG access field as well.

* gfortran.dg/open_access_1.f90: New test.

From-SVN: r107665

gcc/fortran/ChangeLog
gcc/fortran/io.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/open_access_1.f90 [new file with mode: 0644]

index 373f0e6b776b6f201689d402582ed544b355adfa..5aafa484a91ba49eeca94eba3302b662eb21fb57 100644 (file)
@@ -1,3 +1,7 @@
+2005-11-29  Jakub Jelinek  <jakub@redhat.com>
+
+       * io.c (gfc_resolve_open): RESOLVE_TAG access field as well.
+
 2005-11-27 Bernhard Fischer <rep.nop@aon.at>
 
        * gfortran.h: remove superfluous whitespace and use GNU
index 26c335688fc8475da7aa14e99243782e849be411..9ef97e84b7dc79372963b2572da8bff46eb8772a 100644 (file)
@@ -1149,6 +1149,7 @@ gfc_resolve_open (gfc_open * open)
   RESOLVE_TAG (&tag_iostat, open->iostat);
   RESOLVE_TAG (&tag_file, open->file);
   RESOLVE_TAG (&tag_status, open->status);
+  RESOLVE_TAG (&tag_e_access, open->access);
   RESOLVE_TAG (&tag_e_form, open->form);
   RESOLVE_TAG (&tag_e_recl, open->recl);
 
index fc737a8b1a9fc0cd337926232fd9eb1dca37924f..5c6b4c35598e279776bfe0a9b96d592cabe60f1a 100644 (file)
@@ -1,3 +1,7 @@
+2005-11-29  Jakub Jelinek  <jakub@redhat.com>
+
+       * gfortran.dg/open_access_1.f90: New test.
+
 2005-11-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * gcc.dg/charset/builtin2.c: New test.
diff --git a/gcc/testsuite/gfortran.dg/open_access_1.f90 b/gcc/testsuite/gfortran.dg/open_access_1.f90
new file mode 100644 (file)
index 0000000..9546617
--- /dev/null
@@ -0,0 +1,6 @@
+! { dg-do compile }
+
+  real :: a
+  a = 6.0
+  open (unit = 6, file = 'foo', access = a) ! { dg-error "must be of type CHARACTER" }
+end