[Bug fortran/30964] optional arguments to random_seed
fxcoudert at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue May 22 08:24:00 GMT 2007
------- Comment #5 from fxcoudert at gcc dot gnu dot org 2007-05-22 09:23 -------
There's more to it. When generate wrong-code for optional arguments, as shown
by the following code:
$ cat b.f90
program trs
implicit none
integer :: size, ierr
integer, allocatable, dimension(:) :: seed
call random_seed(size)
allocate(seed(size), stat=ierr)
if (ierr /= 0) stop
call test_random_seed()
contains
subroutine test_random_seed(get)
integer, dimension(:), optional :: get
call random_seed(get=get)
end subroutine test_random_seed
end program trs
$ gfortran b.f90 && ./a.out
Segmentation fault
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |major
Keywords| |wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30964
More information about the Gcc-bugs
mailing list