Fix winsup (cygwin) build failure with VLAs and inline functions.

* cp/optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
	and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).

From-SVN: r31663
This commit is contained in:
Jim Wilson 2000-01-28 04:56:59 +00:00 committed by Jim Wilson
parent 138eff91a2
commit aa1eac0c9f
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
* cp/optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
* decl.c (pushdecl): Fix up shadow warnings with respect to implicit

View file

@ -104,6 +104,16 @@ remap_decl (decl, id)
/* Make a copy of the variable or label. */
t = copy_decl_for_inlining (decl, fn,
VARRAY_TREE (id->fns, 0));
/* The decl T could be a dynamic array or other variable size type,
in which case some fields need to be remapped because they may
contain SAVE_EXPRs. */
walk_tree (&DECL_SIZE (t), copy_body_r, id);
if (TREE_TYPE (t) && TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE
&& TYPE_DOMAIN (TREE_TYPE (t)))
walk_tree (&TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))),
copy_body_r, id);
/* Remember it, so that if we encounter this local entity
again we can reuse this copy. */
n = splay_tree_insert (id->decl_map,