This is extracted from Tonto in SPEC CPU 2006: [EMAIL PROTECTED] cpu2006-465g]$ cat foo.f90 SUBROUTINE foo(p, translate) real(kind=kind(1.0d0)), dimension(3) :: p integer(kind=kind(1)), dimension(3), optional :: translate if (present(translate)) p = p + translate END SUBROUTINE [EMAIL PROTECTED] cpu2006-465g]$ make /export/build/gnu/gcc/build-x86_64-linux/gcc/gfortran -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2 -S foo.f90 In file foo.f90:4
if (present(translate)) p = p + translate 1 Error: 'translate' at (1) is an array and OPTIONAL; it cannot therefore be an actual argument of an ELEMENTAL procedure unless there is a non-optional argument with the same rank (12.4.1.5) make: *** [foo.s] Error 1 [EMAIL PROTECTED] cpu2006-465g]$ -- Summary: [4.2 Regression]: Optional argument failed Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hjl at lucon dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28548