[Bug fortran/68566] ICE on using unusable array in reshape (double free or corruption)
jvdelisle at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 1 19:42:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68566
--- Comment #13 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to kargl from comment #12)
> ===================================================================
> --- check.c (revision 237855)
> +++ check.c (working copy)
> @@ -3820,7 +3820,7 @@ gfc_check_reshape (gfc_expr *source, gfc
> if (!type_check (order, 3, BT_INTEGER))
> return false;
>
> - if (order->expr_type == EXPR_ARRAY)
> + if (order->expr_type == EXPR_ARRAY && gfc_is_constant_expr (order))
> {
> int i, order_size, dim, perm[GFC_MAX_DIMENSIONS];
> gfc_expr *e;
I will commit this for you Steve after regtesting, Drop me an email if you plan
to do so.
More information about the Gcc-bugs
mailing list