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
This commit is contained in:
Richard Biener 2013-03-08 13:46:18 +00:00 committed by Richard Biener
parent d4b0c416eb
commit 64366d3558
3 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,11 @@
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

View File

@ -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;

View File

@ -1917,7 +1917,7 @@ create_access_replacement (struct access *access)
&& !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);