]> 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>
Wed, 22 Feb 2012 17:25:11 +0000 (18:25 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Wed, 22 Feb 2012 17:25:11 +0000 (18:25 +0100)
2012-02-22  Tobias Burnus  <burnus@net-b.de>

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

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

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

From-SVN: r184485

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

index f6b54d7767f3c0a71b27cbc31b8e6fb35d0feec8..babf8b56c822ca6c9f6e599bf891e656d6912975 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-22  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/52335
+       * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
+
 2012-02-18  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/52295
index b7eac6c9be1988f95146917fe99a4a7f4201d301..7caadc5056cd34cd5c126295353d5f0fb17ef1dc 100644 (file)
@@ -1947,10 +1947,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 14fcb23cd079a502ae09450f4aa39f6767709d13..d52a3c94018d4522c2848700fd0bd1e03d769f0d 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-22  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/52335
+       * gfortran.dg/io_constraints_10.f90: New.
+
 2012-02-22  Ulrich Weigand  <ulrich.weigand@linaro.org>
 
        * lib/target-supports.exp (check_effective_target_vect_condition):
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