This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/25097] Component of optional argument allowed as arg. to PRESENT



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]