This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25785] New: gfortran - incorrectly issues an error on tests for optional arguments
- 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 17:41:35 -0000
- Subject: [Bug fortran/25785] New: gfortran - incorrectly issues an error on tests for optional arguments
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gfortran has started erroring on some "present" statements (Absoft and others
have no problem with this program and older version of gfortran were also happy
with it) -
[dranta:~/tests/gfortran-D] dir% f90 -c present01.f90
[dranta:~/tests/gfortran-D] dir% gfortran -c present01.f90
In file present01.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 present01.f90
subroutine my_sio_file_write_common(data_c1)
character, intent(in), optional :: data_c1(*)
if (present(data_c1)) then
endif
end subroutine my_sio_file_write_common
[dranta:~/tests/gfortran-D] dir% gfortran --v
Using built-in specs.
Target: powerpc-apple-darwin8.4.0
Configured with: ../gcc/configure --prefix=/Users/dir/gfortran
--enable-languages=c,f95
Thread model: posix
gcc version 4.2.0 20060113 (experimental)
--
Summary: gfortran - incorrectly issues an error on tests for
optional arguments
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dir at lanl dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25785