This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32682] [4.3 Regression] ICE in gfc_trans_array_constructor, at fortran/trans-array.c:1664
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jul 2007 20:47:03 -0000
- Subject: [Bug fortran/32682] [4.3 Regression] ICE in gfc_trans_array_constructor, at fortran/trans-array.c:1664
- References: <bug-32682-14773@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from fxcoudert at gcc dot gnu dot org 2007-07-28 20:47 -------
(In reply to comment #3)
> Index: gcc/fortran/trans-array.c
> ===================================================================
> *** gcc/fortran/trans-array.c (revision 126461)
> --- gcc/fortran/trans-array.c (working copy)
> *************** gfc_trans_array_constructor (gfc_loopinf
> *** 1656,1661 ****
> --- 1656,1673 ----
>
> /* See if the constructor determines the loop bounds. */
> dynamic = false;
> +
> + if (ss->expr->shape && loop->to[0] == NULL_TREE)
> + {
> + int n;
> + for (n = 0; n < ss->expr->rank; n++)
> + {
> + loop->to[n] = gfc_conv_mpz_to_tree (ss->expr->shape [n],
> + gfc_index_integer_kind);
> + loop->from[n] = gfc_index_zero_node;
> + }
> + }
> +
> if (loop->to[0] == NULL_TREE)
> {
> mpz_t size;
This is OK to commit.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32682