aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-10-21 19:11:08 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-10-21 19:11:08 -0400
commitab6c58f120a7cfb52a7e2b9fe8427715f0340574 (patch)
treec5240d60e71816b02dd9d89931d9b569f6a9e4ac /gcc
parent1dcfa896bdee3c95c22401a88ded22171d5caa81 (diff)
downloadgcc-ab6c58f120a7cfb52a7e2b9fe8427715f0340574.zip
gcc-ab6c58f120a7cfb52a7e2b9fe8427715f0340574.tar.gz
gcc-ab6c58f120a7cfb52a7e2b9fe8427715f0340574.tar.bz2
(store_expr): Disable optimization of using convert if exp's type is a
subtype. From-SVN: r12992
Diffstat (limited to 'gcc')
-rw-r--r--gcc/expr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 0cee6f7..e06d3b1 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3125,8 +3125,11 @@ store_expr (exp, target, want_value)
/* If we don't want a value, we can do the conversion inside EXP,
which will often result in some optimizations. Do the conversion
in two steps: first change the signedness, if needed, then
- the extend. */
- if (! want_value)
+ the extend. But don't do this if the type of EXP is a subtype
+ 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))
!= SUBREG_PROMOTED_UNSIGNED_P (target))