OSDN Git Service

2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 3 May 2008 15:14:55 +0000 (15:14 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 3 May 2008 15:14:55 +0000 (15:14 +0000)
PR fortran/33268
* gfortran.dg/io_constraints_4.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134901 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 949a3de..3a47454 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