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/30964] optional arguments to random_seed



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2007-05-28 20:48 -------
The following two codes are handled differently:

$ cat u.f90
  call foo()
contains
  subroutine foo(x)
    integer, dimension(:), optional :: x
    interface
      subroutine bar(x)
        integer, dimension(:), optional :: x
      end subroutine bar
    end interface

    call bar(x)
  end subroutine foo
end
$ cat v.f90
  call foo()
contains
  subroutine foo(x)
    integer, dimension(:), optional :: x

    call random_seed(get=x)
  end subroutine foo
end


For the first one, gfc_conv_missing_dummy() is called, which leads to correct
code. For the second one, gfc_conv_missing_dummy() is not called, leading to
wrong-code.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30964


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