This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR18191
On Sun, Dec 19, 2004 at 02:03:29PM +0100, Steven Bosscher wrote:
> + /* If we are a constructor, just call gimplify_init_ctor_eval to do
> + the store. */
> + if (TREE_CODE (value) == CONSTRUCTOR)
> + gimplify_init_ctor_eval (cref, CONSTRUCTOR_ELTS (value),
> + &loop_body, cleared);
By using LOOP_EXPR+EXIT_EXPR, you're gimplifying this bit twice.
> + append_to_statement_list (build2 (MODIFY_EXPR, TREE_TYPE (cref),
> + cref, value),
> + &loop_body);
Gimplification of this one statement would eventually call back to
gimplify_init_ctor_eval, though I'm not sure how that works out since
we've already pre-eval'ed it once.
I suggest not using LOOP_EXPR and just emitting the two labels and
the two gotos yourself.
r~