diff options
author | Steven G. Kargl <kargls@comcast.net> | 2004-05-30 10:49:50 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-05-30 10:49:50 +0000 |
commit | 5f251c2603135f0565ac08898410d795dff8e8d0 (patch) | |
tree | c7388f0241ffd16eefa7c8649497e527ecdcbeba /gcc/fortran | |
parent | ebeb17c7bb8d07d412b5f02786fb79b0ab0ad2b9 (diff) | |
download | gcc-5f251c2603135f0565ac08898410d795dff8e8d0.zip gcc-5f251c2603135f0565ac08898410d795dff8e8d0.tar.gz gcc-5f251c2603135f0565ac08898410d795dff8e8d0.tar.bz2 |
iresolve.c (gfc_resolve_random_number): Clean up conditional.
* iresolve.c (gfc_resolve_random_number): Clean up conditional.
libgfortran/
* libgfortran.h (random_seed): Update prototype.
* intrinsics/random.c: Disable old implementation and add new one.
testsuite/
* gfortran.fortran-torture/execute/random_1.f90: New test.
From-SVN: r82443
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/fortran/iresolve.c | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ac79556..3bc1809 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2004-05-30 Steven G. Kargl <kargls@comcast.net> + + * iresolve.c (gfc_resolve_random_number): Clean up conditional. + 2004-05-29 Steven G. Kargl <kargls@comcast.net> * simplify.c (gfc_simplify_log): Remove useless line of code. diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c index 46e3803..f1da732 100644 --- a/gcc/fortran/iresolve.c +++ b/gcc/fortran/iresolve.c @@ -1363,12 +1363,15 @@ gfc_resolve_random_number (gfc_code * c ATTRIBUTE_UNUSED) int kind; kind = c->ext.actual->expr->ts.kind; - name = gfc_get_string ((c->ext.actual->expr->rank == 0) ? - PREFIX("random_r%d") : PREFIX("arandom_r%d"), - kind); + if (c->ext.actual->expr->rank == 0) + name = gfc_get_string (PREFIX("random_r%d"), kind); + else + name = gfc_get_string (PREFIX("arandom_r%d"), kind); + c->resolved_sym = gfc_get_intrinsic_sub_symbol (name); } + /* Determine if the arguments to SYSTEM_CLOCK are INTEGER(4) or INTEGER(8) */ void |