diff options
author | Richard Biener <rguenther@suse.de> | 2013-03-21 11:54:27 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2013-03-21 11:54:27 +0000 |
commit | 50d4421cb29f3d9bc1fd5b06dbde5b19b82a14e3 (patch) | |
tree | 11ea563795934cef19ae37fdd0912fedd9a5b666 /gcc/tree-cfg.c | |
parent | 839b422f0838f87583907b8146e9fc7ad111cad0 (diff) | |
download | gcc-50d4421cb29f3d9bc1fd5b06dbde5b19b82a14e3.zip gcc-50d4421cb29f3d9bc1fd5b06dbde5b19b82a14e3.tar.gz gcc-50d4421cb29f3d9bc1fd5b06dbde5b19b82a14e3.tar.bz2 |
tree-cfg.c (verify_expr_no_block): New function.
2013-03-21 Richard Biener <rguenther@suse.de>
* tree-cfg.c (verify_expr_no_block): New function.
(verify_expr_location_1): Verify that neither DECL_DEBUG_EXPR
nor DECL_VALUE_EXPR have locations with associated blocks.
* tree-ssa-live.c (clear_unused_block_pointer_1): Remove.
(clear_unused_block_pointer): Remove code dealing with
blocks in DECL_DEBUG_EXPR locations.
From-SVN: r196865
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 6e6b2c5..c3771e5 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4516,6 +4516,24 @@ verify_location (pointer_set_t *blocks, location_t loc) return false; } +/* Called via walk_tree. Verify that expressions have no blocks. */ + +static tree +verify_expr_no_block (tree *tp, int *walk_subtrees, void *) +{ + if (!EXPR_P (*tp)) + { + *walk_subtrees = false; + return NULL; + } + + location_t loc = EXPR_LOCATION (*tp); + if (LOCATION_BLOCK (loc) != NULL) + return *tp; + + return NULL; +} + /* Called via walk_tree. Verify locations of expressions. */ static tree @@ -4527,7 +4545,17 @@ verify_expr_location_1 (tree *tp, int *walk_subtrees, void *data) && DECL_HAS_DEBUG_EXPR_P (*tp)) { tree t = DECL_DEBUG_EXPR (*tp); - tree addr = walk_tree (&t, verify_expr_location_1, blocks, NULL); + tree addr = walk_tree (&t, verify_expr_no_block, NULL, NULL); + if (addr) + return addr; + } + if ((TREE_CODE (*tp) == VAR_DECL + || TREE_CODE (*tp) == PARM_DECL + || TREE_CODE (*tp) == RESULT_DECL) + && DECL_HAS_VALUE_EXPR_P (*tp)) + { + tree t = DECL_VALUE_EXPR (*tp); + tree addr = walk_tree (&t, verify_expr_no_block, NULL, NULL); if (addr) return addr; } |