+2020-02-24 Mark Eggleston <mark.eggleston@codethink.com>
+ Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/93835
+ * decl.c (gfc_match_data) : Check whether the data expression
+ is a derived type and is a constructor. If a BOZ constant
+ is encountered in the constructor output an error and return
+ MATCH_ERROR.
+
2020-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/93604
bool continue_loop;
bool ma;
- for (i = 0; i<array->rank; i++)
+ for (i = 0; i < array->rank; i++)
res[i] = -1;
/* Shortcut for constant .FALSE. MASK. */
if (ma && gfc_compare_expr (a, value, INTRINSIC_EQ) == 0)
{
- for (i = 0; i<array->rank; i++)
+ for (i = 0; i < array->rank; i++)
res[i] = count[i];
if (!back_val)
goto finish;
} while (count[n] == extent[n]);
}
- finish:
+finish:
result_ctor = gfc_constructor_first (result->value.constructor);
- for (i = 0; i<array->rank; i++)
+ for (i = 0; i < array->rank; i++)
{
gfc_expr *r_expr;
r_expr = result_ctor->expr;
return NULL;
result = gfc_get_array_expr (BT_INTEGER, k, &source->where);
+ result->shape = gfc_get_shape (1);
+ mpz_init (result->shape[0]);
if (source->rank == 0)
return result;
if (t)
gfc_clear_shape (shape, source->rank);
+ mpz_set_si (result->shape[0], source->rank);
+
return result;
}
+2020-02-20 Mark Eggleston <mark.eggleston@codethink.com>
+
+ PR fortran/93835
+ * gfortran.dg/pr77351.f90 : Check for one error instead of two.
+ * gfortran.dg/pr93835.f08 : New test.
+
2020-02-24 Marek Polacek <polacek@redhat.com>
PR c++/93712 - ICE with ill-formed array list-initialization.
! { dg-do compile }
+!
+! PR93835 resulted in different but valid error message
program p
integer :: z(4) = [1, 2, 3, 4]
- print *, any(shape(z) /= [4,1]) ! { dg-error "shape for elemental binary" }
+ print *, any(shape(z) /= [4,1]) ! { dg-error "Shapes for operands at .1. and .2. are not conformable" }
end
-! { dg-excess-errors "operands are incommensurate" }
+
--- /dev/null
+! {dg-do run }
+!
+! PR fortran/93835 - the following code resulted in an ICE
+!
+program p
+ if (any(findloc(shape(1), 1) .ne. 0)) stop 1
+end
+