OSDN Git Service

2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 May 2007 05:03:51 +0000 (05:03 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 May 2007 05:03:51 +0000 (05:03 +0000)
PR fortran/31716
* array.c (spec_dimen_size): Test for correct BT_INTEGER type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125013 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/array.c

index a53691c..f0275ef 100644 (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
index 9359624..2a88cc8 100644 (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);