[Bug fortran/52564] Accepts invalid: Missing I/O list after comma
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52564 Dominique d'Humieres changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Dominique d'Humieres --- Closing.
[Bug fortran/52564] Accepts invalid: Missing I/O list after comma
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52564 --- Comment #2 from Jerry DeLisle --- Author: jvdelisle Date: Thu Jan 31 03:37:16 2019 New Revision: 268412 URL: https://gcc.gnu.org/viewcvs?rev=268412=gcc=rev Log: 2019-01-30 Jerry DeLisle PR fortran/52564 * io.c (match_io): Add check for comma after '*' without subsequent IO list. * gfortran.dg/print_2.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/print_2.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/io.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/52564] Accepts invalid: Missing I/O list after comma
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52564 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added Keywords||accepts-invalid, diagnostic Status|UNCONFIRMED |NEW Last reconfirmed||2012-03-12 CC||burnus at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #1 from Tobias Burnus burnus at gcc dot gnu.org 2012-03-12 14:39:18 UTC --- Confirm. I tried 5 other compilers and all (but g95) report unconditionally an error. From the standard: R912 print-stmt is PRINT format [ , output-item-list ] Thus, without the comma, i.e. PRINT * the program is valid. * * * From io.c: match_io (io_kind k) ... get_io_list: ... if (gfc_match_eos () != MATCH_YES) { if (comma_flag gfc_match_char (',') != MATCH_YES) ... m = match_io_list (k, io_code); if (m == MATCH_ERROR) goto cleanup; if (m == MATCH_NO) goto syntax; If one looks at match_io_list, one finds: if (gfc_match_eos () == MATCH_YES) return MATCH_YES;