Run this program: INTERFACE SUBROUTINE AAP(I) INTEGER, OPTIONAL, VALUE :: I END SUBROUTINE END INTERFACE CALL AAP(0) END SUBROUTINE AAP(N) INTEGER, OPTIONAL, VALUE :: N IF (PRESENT(N)) THEN PRINT*,'PRESENT, WITH VALUE:',N ELSE PRINT*,'NOT PRESENT' ENDIF END
and get: $ ./a.out NOT PRESENT $ which should come to no surprise, if one glazes his/her eyes over trans_expr.c:gfc_conv_missing_dummy. -- Summary: OPTIONAL, VALUE actual argument cannot be an INTEGER 0 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: toon at moene dot indiv dot nluug dot nl http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35203