The following is a common vendor extension but to my knowledge not allowed up to Fortran 2003 (and probably also Fortran 2008): write(*,*), 'Hello' read(*,*), a end gfortran -pedantic -std=f95 -Wall accepts simply accepts it. ifort -stand f03 reports correctly: fortcom: Warning: a.f90, line 1: Use of comma to separate io-access spec and io_list is non_standard. write(*,*), 'Hello' ----------^ fortcom: Warning: a.f90, line 2: Use of comma to separate io-access spec and io_list is non_standard. read(*,*), a ---------^
Subject: Bug number PR 33232 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-08/msg02276.html
Subject: Bug 33232 Author: burnus Date: Fri Aug 31 16:01:57 2007 New Revision: 127997 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127997 Log: 2007-08-31 Tobias Burnus <burnus@net-b.de> PR fortran/33232 * io.c (match_io): Also diagnose extra comma for READ. 2007-08-31 Tobias Burnus <burnus@net-b.de> PR fortran/33232 * gfortran.dg/eor_handling_2.f90: Add dg-warnings. * gfortran.dg/read_1.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/read_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/io.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/eor_handling_2.f90
FIXED for the trunk. Contrary what I claimed in comment 0, only READ was affected - WRITE was already properly diagnosed.