------- Comment #12 from kargl at gcc dot gnu dot org 2008-11-10 15:01 ------- (In reply to comment #11) > (In reply to comment #10) > > Admitted, it does not say SIZE = 8, because this value may be > > compiler- and system-dependent (may also be 12 for gfortran on some > > platforms), which is why the standard provides the SIZE argument in > > the first place. > > > > I fail to see the problem - could you clarify? > > > > A default integer on i386 is 4 bytes. The instruction "print sizeof(size)" > prints 4. I assume it should also print 4 if I use: > > CALL Random_Seed(size=size) > print *, size >
'SIZE' is the number of elements in the array that you need to use with PUT= and GET= program a integer, allocatable :: seeds(:) integer n call random_seed(size = n) allocate(seeds(n)) call random_seed(get = seeds) print*, seeds deallocate(seeds) end program It seems you need to revisit Metcalf and Reid or the Standard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37159