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
This commit is contained in:
Jerry DeLisle 2007-05-24 05:03:51 +00:00
parent 1e2041330f
commit 1505f3b58e
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/31716
* array.c (spec_dimen_size): Test for correct BT_INTEGER type.
2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/32046

View File

@ -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);