This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/39345] [4.4 Regression] ICE in copy_tree_body_r, at tree-inline.c:1020
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2009 23:47:16 -0000
- Subject: [Bug tree-optimization/39345] [4.4 Regression] ICE in copy_tree_body_r, at tree-inline.c:1020
- References: <bug-39345-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from hjl dot tools at gmail dot com 2009-03-02 23:47 -------
can_be_nonlocal calls remap_type to return the remapped type. But
it isn't stored anywhere. Is that intentional? I don't know if
this patch makes any senses. It fixed ICE.
Index: tree-inline.c
===================================================================
--- tree-inline.c (revision 144529)
+++ tree-inline.c (working copy)
@@ -426,6 +426,23 @@ remap_type (tree type, copy_body_data *i
return tmp;
}
+static tree
+have_remap_type (tree type, copy_body_data *id)
+{
+ tree *node;
+
+ if (type == NULL)
+ return type;
+
+ /* See if we have remapped this type. */
+ node = (tree *) pointer_map_contains (id->decl_map, type);
+ if (node)
+ return *node;
+ else
+ return NULL;
+}
+
+ /* The type only needs remapping if it's variably modified. */
/* Decide if DECL can be put into BLOCK_NONLOCAL_VARs. */
static bool
@@ -447,7 +464,7 @@ can_be_nonlocal (tree decl, copy_body_da
return false;
/* We must use global type. */
- if (TREE_TYPE (decl) != remap_type (TREE_TYPE (decl), id))
+ if (TREE_TYPE (decl) != have_remap_type (TREE_TYPE (decl), id))
return false;
/* Wihtout SSA we can't tell if variable is used. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39345