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