Index: io.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/fortran/io.c,v retrieving revision 1.22 diff -c -p -r1.22 io.c *** io.c 11 May 2005 22:32:02 -0000 1.22 --- io.c 28 May 2005 18:38:28 -0000 *************** gfc_match_inquire (void) *** 2426,2431 **** --- 2426,2438 ---- gfc_error ("IOLENGTH tag invalid in INQUIRE statement at %C"); goto cleanup; } + + if (inquire->unit != NULL && inquire->file) + { + gfc_error ("INQUIRE statement at %C cannot contain both FILE and" + " UNIT specifiers"); + goto cleanup; + } } if (gfc_match_eos () != MATCH_YES)