aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-03-08 13:46:18 +0000
committerRichard Biener <rguenther@suse.de>2013-03-08 13:46:18 +0000
commitd4d71a344b89e9123aefcaec3ca42315f3d21149 (patch)
treed081466022e877b8bfc365d6788ad977e42f955f /gcc/tree-cfg.c
parente7d4e671c73784fc0398ba97769a53dbcb5366f1 (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@196546 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 7be44e42e4b..5466e8b43a1 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -4523,6 +4523,15 @@ verify_expr_location_1 (tree *tp, int *walk_subtrees, void *data)
{
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;