re PR fortran/33268 (read ('(f3.3)'), a rejected due to the extra (...))
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 3 May 2008 15:14:55 +0000 (15:14 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 3 May 2008 15:14:55 +0000 (15:14 +0000)
2008-05-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/33268
* gfortran.dg/io_constraints_4.f90: New test.

From-SVN: r134901

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/io_constraints_4.f90 [new file with mode: 0644]

index 949a3deff4acfeb9b0abb770655a892c1ca60d75..3a474546c81cbf00a9d82f96f89d1143d89b31be 100644 (file)
@@ -1,3 +1,8 @@
+2008-05-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/33268
+       * gfortran.dg/io_constraints_4.f90: New test.
+
 2008-05-01  Simon Baldwin <simonb@google.com>
 
        PR bootstrap/36108
diff --git a/gcc/testsuite/gfortran.dg/io_constraints_4.f90 b/gcc/testsuite/gfortran.dg/io_constraints_4.f90
new file mode 100644 (file)
index 0000000..149d31b
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! PR33268 [patch,fortran] read ('(f3.3)'), a rejected due to the extra (...)
+
+write(*,('(a)')) 'Hello'
+write (*,'(f8.3)'), 3.14  ! { dg-warning "Comma before i/o item list" }
+print ('(a)'), "valid"
+read ('(f3.3)'), a 
+read (*, '(f3.3)'), a     ! { dg-warning "Comma before i/o item list" }
+write ('(a)'), "invalid"  ! { dg-error "Invalid form of WRITE statement" }
+end