PR tree-optimization/56570
* tree-cfg.c (verify_expr_location_1): Verify locations for
DECL_DEBUG_EXPR.
* tree-sra.c (create_access_replacement): Strip locations
from DECL_DEBUG_EXPRs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196546
138bc75d-0d04-0410-961f-
82ee72b054a4
2013-03-08 Richard Biener <rguenther@suse.de>
+ PR tree-optimization/56570
+ * tree-cfg.c (verify_expr_location_1): Verify locations for
+ DECL_DEBUG_EXPR.
+ * tree-sra.c (create_access_replacement): Strip locations
+ from DECL_DEBUG_EXPRs.
+
+2013-03-08 Richard Biener <rguenther@suse.de>
+
* tree-inline.c (expand_call_inline): Do not associate
a BLOCK with the location in BLOCK_SOURCE_LOCATION.
* tree-cfg.c (verify_location): Verify BLOCK_SOURCE_LOCATION.
{
struct pointer_set_t *blocks = (struct pointer_set_t *) data;
+ if (TREE_CODE (*tp) == VAR_DECL
+ && DECL_DEBUG_EXPR_IS_FROM (*tp))
+ {
+ tree t = DECL_DEBUG_EXPR (*tp);
+ tree addr = walk_tree (&t, verify_expr_location_1, blocks, NULL);
+ if (addr)
+ return addr;
+ }
+
if (!EXPR_P (*tp))
{
*walk_subtrees = false;
&& !DECL_ARTIFICIAL (access->base))
{
char *pretty_name = make_fancy_name (access->expr);
- tree debug_expr = unshare_expr (access->expr), d;
+ tree debug_expr = unshare_expr_without_location (access->expr), d;
bool fail = false;
DECL_NAME (repl) = get_identifier (pretty_name);