aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-03-08 13:46:18 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-03-08 13:46:18 +0000
commit64366d35581a1d81d77b8ae5f8e0b393f2636852 (patch)
treed081466022e877b8bfc365d6788ad977e42f955f
parentd4b0c416ebaa2edeb4945fa64886dd30f3c1ee8c (diff)
downloadgcc-64366d35581a1d81d77b8ae5f8e0b393f2636852.zip
gcc-64366d35581a1d81d77b8ae5f8e0b393f2636852.tar.gz
gcc-64366d35581a1d81d77b8ae5f8e0b393f2636852.tar.bz2
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
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/tree-cfg.c9
-rw-r--r--gcc/tree-sra.c2
3 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4002376..6fb40c9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,13 @@
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.
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 7be44e4..5466e8b 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;
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 67212c2..35dcd43 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -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);