From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31123 invoked by alias); 24 Jan 2013 18:38:06 -0000 Received: (qmail 29203 invoked by uid 55); 24 Jan 2013 18:37:31 -0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/56094] Invalid line number info generated with tree-level ivopts Date: Thu, 24 Jan 2013 18:38:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg02314.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56094 --- Comment #8 from rguenther at suse dot de 2013-01-24 18:37:30 UTC --- "jakub at gcc dot gnu.org" wrote: > >http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56094 > >--- Comment #6 from Jakub Jelinek 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.