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),

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.

Reply via email to