This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25785] gfortran - incorrectly issues an error on tests for optional arguments with assumed length
- From: "dir at lanl dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2006 18:06:17 -0000
- Subject: [Bug fortran/25785] gfortran - incorrectly issues an error on tests for optional arguments with assumed length
- References: <bug-25785-10129@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from dir at lanl dot gov 2006-01-13 18:06 -------
It also fails with a "double precision" argument -
[dranta:~/tests/gfortran-D] dir% gfortran -c present02.f90
In file present02.f90:3
if (present(data_c1)) then
1
Error: The upper bound in the last dimension must appear in the reference to
the assumed size array 'data_c1' at (1).
[dranta:~/tests/gfortran-D] dir% cat present02.f90
subroutine my_sio_file_write_common(data_c1)
double precision, intent(in), optional :: data_c1(*)
if (present(data_c1)) then
endif
end subroutine my_sio_file_write_common
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25785