This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/28548] New: [4.2 Regression]: Optional argument failed
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jul 2006 23:25:33 -0000
- Subject: [Bug fortran/28548] New: [4.2 Regression]: Optional argument failed
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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