diff options
author | bdavis <bdavis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-14 12:21:22 +0000 |
---|---|---|
committer | bdavis <bdavis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-14 12:21:22 +0000 |
commit | d694eb47787c06604b54afaf179f9fade9899c1a (patch) | |
tree | 8eb3b34c4abee050f0ff71451a9f05b1c5fa40de /libgfortran | |
parent | 3e55413dd9a577b7b270e04f09ccb3f13a90a3cb (diff) | |
download | gcc-d694eb47787c06604b54afaf179f9fade9899c1a.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81836 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/intrinsics/random.c | 1 | ||||
-rw-r--r-- | libgfortran/libgfortran.h | 6 | ||||
-rw-r--r-- | libgfortran/runtime/main.c | 2 |
4 files changed, 14 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 7df9edf3f6c..bbf22d4d082 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +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 Schlüter <tobias.schlueter@physik.uni-muenchen.de> * io/format.c: (parse_format_list): No comma is required after diff --git a/libgfortran/intrinsics/random.c b/libgfortran/intrinsics/random.c index b578148f469..120c9517fa2 100644 --- a/libgfortran/intrinsics/random.c +++ b/libgfortran/intrinsics/random.c @@ -70,7 +70,6 @@ static unsigned int seed[N]; /* This is the routine which handles the seeding of the generator, and also reading and writing of the seed. */ -#define random_seed prefix(random_seed) void random_seed (GFC_INTEGER_4 * size, const gfc_array_i4 * put, const gfc_array_i4 * get) diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index 14a217a64f6..112fd075dcf 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -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, 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 diff --git a/libgfortran/runtime/main.c b/libgfortran/runtime/main.c index 60c032b4fcb..e3eaf2b2ffc 100644 --- a/libgfortran/runtime/main.c +++ b/libgfortran/runtime/main.c @@ -100,6 +100,8 @@ init (void) #endif memory_init (); + random_seed(NULL,NULL,NULL); + } |