[Bug fortran/25785] gfortran - incorrectly issues an error on tests for optional arguments with assumed length

dir at lanl dot gov gcc-bugzilla@gcc.gnu.org
Fri Jan 13 18:06:00 GMT 2006



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



More information about the Gcc-bugs mailing list