+2015-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/36192
+ * array.c (gfc_ref_dimen_size): Check for BT_INTEGER before calling
+ mpz_set.
+
2015-10-26 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/66927
if (ar->start[dimen] == NULL)
{
if (ar->as->lower[dimen] == NULL
- || ar->as->lower[dimen]->expr_type != EXPR_CONSTANT)
+ || ar->as->lower[dimen]->expr_type != EXPR_CONSTANT
+ || ar->as->lower[dimen]->ts.type != BT_INTEGER)
goto cleanup;
mpz_set (lower, ar->as->lower[dimen]->value.integer);
}
if (ar->end[dimen] == NULL)
{
if (ar->as->upper[dimen] == NULL
- || ar->as->upper[dimen]->expr_type != EXPR_CONSTANT)
+ || ar->as->upper[dimen]->expr_type != EXPR_CONSTANT
+ || ar->as->upper[dimen]->ts.type != BT_INTEGER)
goto cleanup;
mpz_set (upper, ar->as->upper[dimen]->value.integer);
}
+2015-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/36192
+ * gfortran.dg/pr36192.f90: New test.
+
2015-10-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/atomic-noinline.c: Change test on __atomic_is_lock_free.
--- /dev/null
+! { dg-do compile }
+! PR fortran/36192.f90
+!
+program three_body
+ real, parameter :: n = 2, d = 2
+ real, dimension(n,d) :: x ! { dg-error "of INTEGER type|of INTEGER type" }
+ x(1,:) = (/ 1.0, 0.0 /)
+end program three_body
+! { dg-prune-output "have constant shape" }