aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/array.c
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2007-05-24 05:03:51 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2007-05-24 05:03:51 +0000
commit1505f3b58e776fb2865ae9b41d492f3d6b5504a7 (patch)
tree13645828b68ce083daa0c223ccba48aa9e4da1e7 /gcc/fortran/array.c
parent1e2041330fd0997c734a1a8d48ebaadb2037cb32 (diff)
downloadgcc-1505f3b58e776fb2865ae9b41d492f3d6b5504a7.zip
gcc-1505f3b58e776fb2865ae9b41d492f3d6b5504a7.tar.gz
gcc-1505f3b58e776fb2865ae9b41d492f3d6b5504a7.tar.bz2
re PR fortran/31716 (segfault with real array bounds)
2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/31716 * array.c (spec_dimen_size): Test for correct BT_INTEGER type. From-SVN: r125013
Diffstat (limited to 'gcc/fortran/array.c')
-rw-r--r--gcc/fortran/array.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c
index 9359624..2a88cc8 100644
--- a/gcc/fortran/array.c
+++ b/gcc/fortran/array.c
@@ -1725,7 +1725,9 @@ spec_dimen_size (gfc_array_spec *as, int dimen, mpz_t *result)
if (as->type != AS_EXPLICIT
|| as->lower[dimen]->expr_type != EXPR_CONSTANT
- || as->upper[dimen]->expr_type != EXPR_CONSTANT)
+ || as->upper[dimen]->expr_type != EXPR_CONSTANT
+ || as->lower[dimen]->ts.type != BT_INTEGER
+ || as->upper[dimen]->ts.type != BT_INTEGER)
return FAILURE;
mpz_init (*result);