http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56094
--- Comment #8 from rguenther at suse dot de <rguenther at suse dot de> 2013-01-24 18:37:30 UTC --- "jakub at gcc dot gnu.org" <gcc-bugzi...@gcc.gnu.org> wrote: > >http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56094 > >--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-24 >17:26:48 UTC --- >--- gimplify.c.jj 2013-01-11 09:02:55.000000000 +0100 >+++ gimplify.c 2013-01-24 18:15:54.246157569 +0100 >@@ -8600,6 +8600,7 @@ force_gimple_operand_1 (tree expr, gimpl > { > enum gimplify_status ret; > struct gimplify_ctx gctx; >+ location_t saved_location; > > *stmts = NULL; > >@@ -8613,6 +8614,8 @@ force_gimple_operand_1 (tree expr, gimpl > push_gimplify_context (&gctx); > gimplify_ctxp->into_ssa = gimple_in_ssa_p (cfun); > gimplify_ctxp->allow_rhs_cond_expr = true; >+ saved_location = input_location; >+ input_location = UNKNOWN_LOCATION; > > if (var) > { >@@ -8634,6 +8637,7 @@ force_gimple_operand_1 (tree expr, gimpl > gcc_assert (ret != GS_ERROR); > } > >+ input_location = saved_location; > pop_gimplify_context (NULL); > > return expr; > >seems to work (there are way too many uses of input_location in >gimplify.c), Eh, I thought we arrived at this somewhere Earlier this year... Ah, I suggested input_location should be unknown_location Anyway here and we should arrange so and Assert in force_simple_operand. >alternatively we could e.g. grab input_location temporarily just in >force_gimple_operand_gsi_1, depending on gimple_location of the stmt >this >should be emitted before resp. after.