2017-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84134
* array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
zero, return false.
2017-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84134
* gfortran.dg/data_implied_do_2.f90: New test.
From-SVN: r257211
+2017-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/84134
+ * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
+ zero, return false.
+
2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84133
else
{
stride_expr = gfc_copy_expr(ar->stride[dimen]);
+
if(!gfc_simplify_expr(stride_expr, 1))
gfc_internal_error("Simplification error");
- if (stride_expr->expr_type != EXPR_CONSTANT)
+
+ if (stride_expr->expr_type != EXPR_CONSTANT
+ || mpz_cmp_ui (stride_expr->value.integer, 0) == 0)
{
mpz_clear (stride);
return false;
+2017-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/84134
+ * gfortran.dg/data_implied_do_2.f90: New test.
+
2018-01-30 Janus Weil <janus@gcc.gnu.org>
* gfortran.dg/pr68318_1.f90: Add closing bracket in dejagnu directive.
--- /dev/null
+! { dg-do compile }
+! PR fortran/84134 - this used to ICE.
+! Test case by Gerhard Steinmetz
+
+program p
+ integer :: i, x(3)
+ data (x(i+1:i+2:i),i=0,1) /1,2,3/ ! { dg-error "Nonconstant array section" }
+end