aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/check.c
diff options
context:
space:
mode:
authorBrooks Moses <brooks.moses@codesourcery.com>2007-01-05 01:40:06 +0000
committerBrooks Moses <brooks@gcc.gnu.org>2007-01-04 17:40:06 -0800
commitc79441520f2a862204dabe01e20edce3bc7b0953 (patch)
treeaa09475990d0d3cc748d9a3faf3be849f08ed790 /gcc/fortran/check.c
parentea8dda63be6e1d95c7ca588418fa0581890e95e8 (diff)
downloadgcc-c79441520f2a862204dabe01e20edce3bc7b0953.zip
gcc-c79441520f2a862204dabe01e20edce3bc7b0953.tar.gz
gcc-c79441520f2a862204dabe01e20edce3bc7b0953.tar.bz2
re PR fortran/30371 (kill suboutine accepts (invalid) array arguments.)
PR 30371 * check.c (gfc_check_kill_sub): Add checks for non-scalar arguments. From-SVN: r120468
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r--gcc/fortran/check.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 0c5fc13..e51fd82 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -1327,9 +1327,15 @@ gfc_check_kill_sub (gfc_expr * pid, gfc_expr * sig, gfc_expr * status)
if (type_check (pid, 0, BT_INTEGER) == FAILURE)
return FAILURE;
+ if (scalar_check (pid, 0) == FAILURE)
+ return FAILURE;
+
if (type_check (sig, 1, BT_INTEGER) == FAILURE)
return FAILURE;
+ if (scalar_check (sig, 1) == FAILURE)
+ return FAILURE;
+
if (status == NULL)
return SUCCESS;