Commit 64366d35 by Richard Biener Committed by Richard Biener

re PR lto/56570 (ICE when streaming a TREE_BLOCK)

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.

From-SVN: r196546
parent d4b0c416
2013-03-08 Richard Biener <rguenther@suse.de> 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 * tree-inline.c (expand_call_inline): Do not associate
a BLOCK with the location in BLOCK_SOURCE_LOCATION. a BLOCK with the location in BLOCK_SOURCE_LOCATION.
* tree-cfg.c (verify_location): Verify BLOCK_SOURCE_LOCATION. * tree-cfg.c (verify_location): Verify BLOCK_SOURCE_LOCATION.
......
...@@ -4523,6 +4523,15 @@ verify_expr_location_1 (tree *tp, int *walk_subtrees, void *data) ...@@ -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; 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)) if (!EXPR_P (*tp))
{ {
*walk_subtrees = false; *walk_subtrees = false;
......
...@@ -1917,7 +1917,7 @@ create_access_replacement (struct access *access) ...@@ -1917,7 +1917,7 @@ create_access_replacement (struct access *access)
&& !DECL_ARTIFICIAL (access->base)) && !DECL_ARTIFICIAL (access->base))
{ {
char *pretty_name = make_fancy_name (access->expr); 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; bool fail = false;
DECL_NAME (repl) = get_identifier (pretty_name); DECL_NAME (repl) = get_identifier (pretty_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment