An OPEN statement needs to either have a unit number in the first item in the list, or have a UNIT= (or NEWUNIT= in F2008) keyword somewhere else. Here is an example where the unit number is not specified, yet gfortran does not issue an error:
subroutine openit implicit none open (file='x') end subroutine This was tested with version 4.4.1 on Ubuntu linux. -- Summary: OPEN statement not diagnosing missing unit number Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: w6ws at earthlink dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43832