]> 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:53:54 +0000 (23:53 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Thu, 23 Feb 2012 22:53:54 +0000 (23:53 +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: r184534

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

index 91be73403b3b72209db698fab1496da8a85c06fc..fc0237dd51ea6a4f2c497793b1fae69322edbc35 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-02-09  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
index 3ce7e816b9a04007f0374393bf29c718133193c7..b0f3ebe4ad74ccb881da075bb90cb24d2b82fcf3 100644 (file)
@@ -1938,10 +1938,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 e84218e10cf2543ef946d6e59a2119c70afa28e6..80bfd16e4777b4c65aabce1341dcf666a50ffe42 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  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from trunk
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