]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/52335 (I/O: -std=f95 rejects valid DELIM= in OPEN)
authorTobias Burnus <burnus@net-b.de>
Thu, 23 Feb 2012 22:54:26 +0000 (23:54 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Thu, 23 Feb 2012 22:54:26 +0000 (23:54 +0100)
2012-02-23  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52335
        * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.

2012-02-23  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52335
        * gfortran.dg/io_constraints_10.f90: New.

From-SVN: r184535

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

index 627a5ee332fc385c0303f2ba02365e53f59492a1..812be0e95af869e340cc01cfc4e111f5404bbf75 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-23  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/52335
+       * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
+
 2012-01-28  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/52022
index 9b0ee8d17ca84ac54e159753bd07bafb2df71c20..156b8f96361fb62e64b4fd8898410a21ee83c832 100644 (file)
@@ -1893,10 +1893,6 @@ gfc_match_open (void)
   /* Checks on the DELIM specifier.  */
   if (open->delim)
     {
-      if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: DELIM= at %C "
-         "not allowed in Fortran 95") == FAILURE)
-       goto cleanup;
-
       if (open->delim->expr_type == EXPR_CONSTANT)
        {
          static const char *delim[] = { "APOSTROPHE", "QUOTE", "NONE", NULL };
index b89bd70ab088a1e30f648e18194f1d5814fdb5fa..d032ebf1908217a244f85540cce9857a15d48bce 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-23  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/52335
+       * gfortran.dg/io_constraints_10.f90: New.
+
 2012-02-23  Uros Bizjak  <ubizjak@gmail.com>
 
        PR c/52290
diff --git a/gcc/testsuite/gfortran.dg/io_constraints_10.f90 b/gcc/testsuite/gfortran.dg/io_constraints_10.f90
new file mode 100644 (file)
index 0000000..bb756aa
--- /dev/null
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-std=f95" }
+!
+! PR fortran/52335
+!
+
+integer :: lun
+character(len=20) :: str
+
+! VALID Fortran 95:
+open(unit=lun,file=str,delim='apostrophe',status='old')
+inquire(lun, delim=str)
+
+! Fortran 2003:
+write(*,*, delim='apostrophe') 'a' ! { dg-error "Fortran 2003: DELIM= at .1. not allowed in Fortran 95" }
+end