Commit abdef811 by Bud Davis Committed by Bud Davis

re PR libfortran/15149 (problem computing Pi)

        PR fortran/15149
        * gfortran.fortran-torture/execute/random_init.f90: New test.
        * libgfortan.h,intrinsics/random.c: Made random_seed visible.
        * runtime/main.c(init): Call random_seed as part of MAIN init.

From-SVN: r81836
parent 084c663c
2004-05-14 Bud Davis <bdavis9659@comcast.net>
PR fortran/15149
* gfortran.fortran-torture/execute/random_init.f90: New test.
2004-05-13 Paul Brook <paul@codesourcery.com> 2004-05-13 Paul Brook <paul@codesourcery.com>
PR fortran/15314 PR fortran/15314
......
! pr 15149
! verify the random number generator is functional
program test_random
implicit none
real :: r(5) = 0.0
call random_number(r)
if (all (r .eq. 0)) call abort
end program
2004-05-14 Bud Davis <bdavis9659@comcast.net>
PR fortran/15149
* libgfortan.h,intrinsics/random.c: Made random_seed visible.
* runtime/main.c(init): Call random_seed as part of MAIN init.
2004-05-13 Tobias Schlter <tobias.schlueter@physik.uni-muenchen.de> 2004-05-13 Tobias Schlter <tobias.schlueter@physik.uni-muenchen.de>
* io/format.c: (parse_format_list): No comma is required after * io/format.c: (parse_format_list): No comma is required after
......
...@@ -70,7 +70,6 @@ static unsigned int seed[N]; ...@@ -70,7 +70,6 @@ static unsigned int seed[N];
/* This is the routine which handles the seeding of the generator, /* This is the routine which handles the seeding of the generator,
and also reading and writing of the seed. */ and also reading and writing of the seed. */
#define random_seed prefix(random_seed)
void void
random_seed (GFC_INTEGER_4 * size, const gfc_array_i4 * put, random_seed (GFC_INTEGER_4 * size, const gfc_array_i4 * put,
const gfc_array_i4 * get) const gfc_array_i4 * get)
......
...@@ -396,5 +396,11 @@ void internal_unpack_8 (gfc_array_i8 *, const GFC_INTEGER_8 *); ...@@ -396,5 +396,11 @@ void internal_unpack_8 (gfc_array_i8 *, const GFC_INTEGER_8 *);
GFC_INTEGER_4 compare_string (GFC_INTEGER_4, const char *, GFC_INTEGER_4 compare_string (GFC_INTEGER_4, const char *,
GFC_INTEGER_4, const char *); GFC_INTEGER_4, const char *);
/* random.c */
#define random_seed prefix(random_seed)
void random_seed (GFC_INTEGER_4 * size, const gfc_array_i4 * put,
const gfc_array_i4 * get);
#endif #endif
...@@ -100,6 +100,8 @@ init (void) ...@@ -100,6 +100,8 @@ init (void)
#endif #endif
memory_init (); memory_init ();
random_seed(NULL,NULL,NULL);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment