(store_expr): Disable optimization of using convert if exp's type is a

subtype.

From-SVN: r12992
This commit is contained in:
Richard Kenner 1996-10-21 19:11:08 -04:00
parent 1dcfa896bd
commit ab6c58f120
1 changed files with 5 additions and 2 deletions

View File

@ -3125,8 +3125,11 @@ store_expr (exp, target, want_value)
/* If we don't want a value, we can do the conversion inside EXP, /* If we don't want a value, we can do the conversion inside EXP,
which will often result in some optimizations. Do the conversion which will often result in some optimizations. Do the conversion
in two steps: first change the signedness, if needed, then in two steps: first change the signedness, if needed, then
the extend. */ the extend. But don't do this if the type of EXP is a subtype
if (! want_value) of something else since then the conversion might involve
more than just converting modes. */
if (! want_value && INTEGRAL_TYPE_P (TREE_TYPE (exp))
&& TREE_TYPE (TREE_TYPE (exp)) == 0)
{ {
if (TREE_UNSIGNED (TREE_TYPE (exp)) if (TREE_UNSIGNED (TREE_TYPE (exp))
!= SUBREG_PROMOTED_UNSIGNED_P (target)) != SUBREG_PROMOTED_UNSIGNED_P (target))