diff options
author | Steven G. Kargl <kargls@comcast.net> | 2004-05-23 11:06:09 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-05-23 11:06:09 +0000 |
commit | 95d3f56711188e06e8ad5e3e8010cb6a09cb5ed3 (patch) | |
tree | 17224dedbb92637208cdc207ceca31cbf44de7cb /gcc | |
parent | 4460cef2258096e1ad518654c127eea8ac71fb79 (diff) | |
download | gcc-95d3f56711188e06e8ad5e3e8010cb6a09cb5ed3.zip gcc-95d3f56711188e06e8ad5e3e8010cb6a09cb5ed3.tar.gz gcc-95d3f56711188e06e8ad5e3e8010cb6a09cb5ed3.tar.bz2 |
* check.c (gfc_check_random_seed): Issue for too many arguments.
From-SVN: r82162
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/fortran/check.c | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c664f78..8b3e522 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2004-05-23 Steven G. Kargl <kargls@comcast.net> + + * check.c (gfc_check_random_seed): Issue for too many arguments. + 2004-05-22 Steven G. Kargl <kargls@comcast.net> * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed. diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index dadb116..007f8d9 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -1833,8 +1833,14 @@ gfc_check_random_seed (gfc_expr * size, gfc_expr * put, gfc_expr * get) if (put != NULL) { + + if (size != NULL) + gfc_error ("Too many arguments to %s at %L", gfc_current_intrinsic, + &put->where); + if (array_check (put, 1) == FAILURE) return FAILURE; + if (rank_check (put, 1, 1) == FAILURE) return FAILURE; @@ -1847,8 +1853,14 @@ gfc_check_random_seed (gfc_expr * size, gfc_expr * put, gfc_expr * get) if (get != NULL) { + + if (size != NULL || put != NULL) + gfc_error ("Too many arguments to %s at %L", gfc_current_intrinsic, + &get->where); + if (array_check (get, 2) == FAILURE) return FAILURE; + if (rank_check (get, 2, 1) == FAILURE) return FAILURE; |