This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25097] Component of optional argument allowed as arg. to PRESENT
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2006 18:40:55 -0000
- Subject: [Bug fortran/25097] Component of optional argument allowed as arg. to PRESENT
- References: <bug-25097-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-01-13 18:40 -------
It is not just derived types, it is also arrays too:
The following is invalid code and should be rejected.
subroutine my_sio_file_write_common(data_c1)
real, intent(in), optional :: data_c1(4)
if (present(data_c1(1))) then
call abort()
endif
end subroutine my_sio_file_write_common
-------
Found this while looking into PR 25785.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25097