https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277
Bug ID: 86277 Summary: Presence of optional arguments not recognized for zero length arrays Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: m.diehl at mpie dot de Target Milestone: --- present(arg) does not recognize the presence of an optional argument 'arg' if 'arg' is an array of size 0: program test implicit none call i call i([integer::]) ! expect "optional argument present: T" call i([1]) contains subroutine i(str) integer, dimension(:), optional, intent(in) :: str write(6,*) 'optional argument present:', present(str) end subroutine i end program