+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
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)
+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.
+
2006-05-26 Jakub Jelinek <jakub@redhat.com>
PR target/27758
inquire (unit=-16, exist=l)
if (l) call abort
open (unit=16, file='inquire_9.tst')
- print (unit=16, fmt='(a)'), 'Test'
+ write (unit=16, fmt='(a)') 'Test'
l = .false.
inquire (unit=16, exist=l)
if (.not.l) call abort
--- /dev/null
+! { dg-do compile }
+ program main
+ character*80 line
+ print (line,'(A)'), 'hello' ! { dg-error "Syntax error" }
+ end
--- /dev/null
+! { dg-do compile }
+program main
+ character*80 line
+ print (line,'(A)'), 'hello' ! { dg-error "Syntax error" }
+end program main