aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog4
-rw-r--r--gcc/fortran/check.c12
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;