]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/60751 (Extra comma in WRITE statement not diagnosed)
authorDominique d'Humieres <dominiq@gcc.gnu.org>
Sat, 11 Jun 2016 19:21:22 +0000 (21:21 +0200)
committerDominique d'Humieres <dominiq@gcc.gnu.org>
Sat, 11 Jun 2016 19:21:22 +0000 (21:21 +0200)
2016-06-11  Dominique d'Humieres  <dominiq@lps.ens.fr>

PR target/60751
* gfortran.dg/comma_IO_extension_1.f90: New test.
* gfortran.dg/comma_IO_extension_2.f90: Likewise.

From-SVN: r237330

gcc/testsuite/gfortran.dg/comma_IO_extension_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/comma_IO_extension_2.f90 [new file with mode: 0644]

diff --git a/gcc/testsuite/gfortran.dg/comma_IO_extension_1.f90 b/gcc/testsuite/gfortran.dg/comma_IO_extension_1.f90
new file mode 100644 (file)
index 0000000..abbb69d
--- /dev/null
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! PR 60751
+! Contributed by Walter Spector <w6ws@earthlink.net>
+program extracomma
+  implicit none
+
+  write (*,*), 1, 2, 3 ! { dg-warning "Legacy Extension: Comma before i/o item list" }
+end program
diff --git a/gcc/testsuite/gfortran.dg/comma_IO_extension_2.f90 b/gcc/testsuite/gfortran.dg/comma_IO_extension_2.f90
new file mode 100644 (file)
index 0000000..5e80a17
--- /dev/null
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! { dg-options "-std=legacy" }
+! PR 60751
+! Contributed by Walter Spector <w6ws@earthlink.net>
+program extracomma
+  implicit none
+
+  write (*,*), 1, 2, 3
+end program