From 95d3f56711188e06e8ad5e3e8010cb6a09cb5ed3 Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Sun, 23 May 2004 11:06:09 +0000 Subject: * check.c (gfc_check_random_seed): Issue for too many arguments. From-SVN: r82162 --- gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/check.c | 12 ++++++++++++ 2 files changed, 16 insertions(+) (limited to 'gcc/fortran') 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 + + * 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 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; -- cgit v1.1