expr.c (store_expr): Don't fiddle subreg promotion for types with precision smaller...
authorRichard Henderson <rth@redhat.com>
Sun, 11 Jul 2004 11:11:36 +0000 (04:11 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 11 Jul 2004 11:11:36 +0000 (04:11 -0700)
        * expr.c (store_expr): Don't fiddle subreg promotion for types
        with precision smaller than the mode.

From-SVN: r84501

gcc/ChangeLog
gcc/expr.c

index b6d3bdf3d2460f1286eb5a714aedbf342823bdde..295dba33903705831c3be1858da20fdfde33e065 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-11  Richard Henderson  <rth@redhat.com>
+
+       * expr.c (store_expr): Don't fiddle subreg promotion for types
+       with precision smaller than the mode.
+
 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
 
        * tree.h (all_types_permanent): Remove.
index 6806f1f7d25d0d7b166c9f95285de2fa805b26b9..f9c65485bd247ce7bc48cd4fe16e6ca7c2bf2778 100644 (file)
@@ -4144,7 +4144,10 @@ store_expr (tree exp, rtx target, int want_value)
         more than just converting modes.  */
       if ((want_value & 1) == 0
          && INTEGRAL_TYPE_P (TREE_TYPE (exp))
-         && TREE_TYPE (TREE_TYPE (exp)) == 0)
+         && TREE_TYPE (TREE_TYPE (exp)) == 0
+         && (!lang_hooks.reduce_bit_field_operations
+             || (GET_MODE_PRECISION (GET_MODE (target))
+                 == TYPE_PRECISION (TREE_TYPE (exp)))))
        {
          if (TYPE_UNSIGNED (TREE_TYPE (exp))
              != SUBREG_PROMOTED_UNSIGNED_P (target))