aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorThomas Koenig <Thomas.Koenig@online.de>2006-05-26 19:53:18 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2006-05-26 19:53:18 +0000
commit4d08533cd442757fc3eb564bcd1d56a6420bbd76 (patch)
treecce105d2a8a9efe92aedfc36f6243be9dd45f8f5 /gcc/fortran
parentdd46a4ded128ec8c0cf02aa20d24ae2783e0c68e (diff)
downloadgcc-4d08533cd442757fc3eb564bcd1d56a6420bbd76.zip
gcc-4d08533cd442757fc3eb564bcd1d56a6420bbd76.tar.gz
gcc-4d08533cd442757fc3eb564bcd1d56a6420bbd76.tar.bz2
re PR fortran/23151 (print (buf, format), expression should be invalid)
2006-05-26 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/23151 * io.c (match_io): print (1,*) is an error. 2006-05-26 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/23151 * gfortran.dg/inquire_9.f90: Fix illegal print syntax. * gfortran.dg/print_parentheses_1.f: New test. * gfortran.dg/print_parentheses_2.f90: New test. From-SVN: r114138
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/io.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 0117eb6..eed3e0e 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-26 Thomas Koenig <Thomas.Koenig@online.de>
+
+ PR fortran/23151
+ * io.c (match_io): print (1,*) is an error.
+
2006-05-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/27709
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 30344d9..4a55cbd 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -2424,6 +2424,12 @@ match_io (io_kind k)
dt->io_unit = default_unit (k);
goto get_io_list;
}
+ else
+ {
+ /* Error for constructs like print (1,*). */
+ if (k == M_PRINT)
+ goto syntax;
+ }
/* Match a control list */
if (match_dt_element (k, dt) == MATCH_YES)