[Bug fortran/28548] New: [4.2 Regression]: Optional argument failed
hjl at lucon dot org
gcc-bugzilla@gcc.gnu.org
Sun Jul 30 23:25:00 GMT 2006
This is extracted from Tonto in SPEC CPU 2006:
[hjl@gnu-16 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
[hjl@gnu-16 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
[hjl@gnu-16 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
More information about the Gcc-bugs
mailing list