From: Steven G. Kargl Date: Sun, 23 May 2004 11:06:09 +0000 (+0000) Subject: * check.c (gfc_check_random_seed): Issue for too many arguments. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=95d3f56711188e06e8ad5e3e8010cb6a09cb5ed3;p=gcc.git * check.c (gfc_check_random_seed): Issue for too many arguments. From-SVN: r82162 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c664f78719f..8b3e522fcc2 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2004-05-23 Steven G. Kargl + + * check.c (gfc_check_random_seed): Issue for too many arguments. + 2004-05-22 Steven G. Kargl * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed. diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index dadb1166ea9..007f8d975e4 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;