* decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.

From-SVN: r18974
This commit is contained in:
Jason Merrill 1998-04-03 12:17:58 +00:00 committed by Jason Merrill
parent 9a71c18b28
commit b3e401c25a
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,7 @@
Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
Re-implement allocation of base class subobjects.
* tree.c (unshare_base_binfos): New fn.
(layout_basetypes): Use it. Now handles offsets of both virtual and

View File

@ -12886,6 +12886,12 @@ cplus_expand_expr_stmt (exp)
libg++ to miscompile, and tString to core dump. */
exp = build1 (CLEANUP_POINT_EXPR, TREE_TYPE (exp), exp);
#endif
/* Strip unused implicit INDIRECT_REFs of references. */
if (TREE_CODE (exp) == INDIRECT_REF
&& TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == REFERENCE_TYPE)
exp = TREE_OPERAND (exp, 0);
/* If we don't do this, we end up down inside expand_expr
trying to do TYPE_MODE on the ERROR_MARK, and really
go outside the bounds of the type. */