+2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/33077
+ * gfortran.dg/random_7.f90: Initialize variable.
+
2007-08-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/33074
integer, allocatable, dimension(:) :: seed, check
call test_random_seed(size)
allocate(seed(size),check(size))
+ seed(:) = huge(seed) / 17
call test_random_seed(put=seed)
call test_random_seed(get=check)
+ print *, seed
+ print *, check
if (any (seed /= check)) call abort
contains
subroutine test_random_seed(size, put, get)
+2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/33077
+ * intrinsics/random.c (random_seed_i8): Fix code logic.
+
2007-08-13 Danny Smith <dannysmit@users.sourceforge.net>
* acinclude.m4 (GTHREAD_USE_WEAK) Define to 0 for mingw32.
runtime_error ("Array size of PUT is too small.");
/* This code now should do correct strides. */
- for (i = 0; i < kiss_size; i += 2)
- memcpy (&kiss_seed[i], &(put->data[i * put->dim[0].stride]),
+ for (i = 0; i < kiss_size / 2; i++)
+ memcpy (&kiss_seed[2*i], &(put->data[i * put->dim[0].stride]),
sizeof (GFC_UINTEGER_8));
}
runtime_error ("Array size of GET is too small.");
/* This code now should do correct strides. */
- for (i = 0; i < kiss_size; i += 2)
- memcpy (&(get->data[i * get->dim[0].stride]), &kiss_seed[i],
+ for (i = 0; i < kiss_size / 2; i++)
+ memcpy (&(get->data[i * get->dim[0].stride]), &kiss_seed[2*i],
sizeof (GFC_UINTEGER_8));
}