diff options
author | Canqun Yang <canqun@nudt.edu.cn> | 2004-10-30 14:18:34 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-10-30 14:18:34 +0000 |
commit | 7a003d8e2e5f20fab390c2e2988e1c630cbb3ba9 (patch) | |
tree | 7000c863d0f16b0b8e5755c5819227f439868d5f /gcc/fortran/intrinsic.c | |
parent | cbb1cada36cb9831e9a20629e1f5c555c2a84590 (diff) | |
download | gcc-7a003d8e2e5f20fab390c2e2988e1c630cbb3ba9.zip gcc-7a003d8e2e5f20fab390c2e2988e1c630cbb3ba9.tar.gz gcc-7a003d8e2e5f20fab390c2e2988e1c630cbb3ba9.tar.bz2 |
check.c (gfc_check_rand): Allow missing optional argument.
2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
* check.c (gfc_check_rand): Allow missing optional argument.
(gfc_check_irand): Ditto.
* intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
libgfortran/
* intrinsics/rand.c (irand): Handle NULL argument.
From-SVN: r89886
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r-- | gcc/fortran/intrinsic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index aa358f07..bc69f54 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -1307,7 +1307,7 @@ add_functions (void) /* The following function is for G77 compatibility. */ add_sym_1 ("irand", 0, 1, BT_INTEGER, 4, gfc_check_irand, NULL, NULL, - i, BT_INTEGER, 4, 0); + i, BT_INTEGER, 4, 1); make_generic ("irand", GFC_ISYM_IRAND); @@ -1602,7 +1602,7 @@ add_functions (void) /* The following function is for G77 compatibility. */ add_sym_1 ("rand", 0, 1, BT_REAL, 4, gfc_check_rand, NULL, NULL, - i, BT_INTEGER, 4, 0); + i, BT_INTEGER, 4, 1); /* Compatibility with HP FORTRAN 77/iX Reference. Note, rand() and ran() use slightly different shoddy multiplicative congruential |