On 01/28/2013 07:09 AM, Jakub Jelinek wrote:
Hi!

As discussed in the PR, this is a safer variant of a fix for 4.8, where
input_location during most optimization passes is set to
DECL_SOURCE_LOCATION (current_function_decl) and various parts of the
gimplifier e.g. during force_gimple_operand* may end up setting
gimple_location to that.  For 4.9, we should revert this and set
input_location to UNKNOWN_LOCATION for the optimizers.

Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk.

2013-01-28  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/56094
        * gimplify.c (force_gimple_operand_1): Temporarily set input_location
        to UNKNOWN_LOCATION while gimplifying expr.

        * gcc.dg/pr56094.c: New test.
Based on c#15, we should probably consider this a bit of a band-aid, right? Thus we'll install the band-aid, but keep the PR open pending a better solution for handling of input_location, correct?

jeff
+/* Verify no statements get the location of the foo () decl.  */
+/* { dg-final { scan-tree-dump-not " : 65:1\\\]" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */

        Jakub


Reply via email to