expr.c (store_constructor): Use gen_int_mode to correctly sign-extend CONST_INT value.
authorUlrich Weigand <uweigand@de.ibm.com>
Sat, 27 Mar 2004 16:15:59 +0000 (16:15 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Sat, 27 Mar 2004 16:15:59 +0000 (16:15 +0000)
* expr.c (store_constructor): Use gen_int_mode to correctly
sign-extend CONST_INT value.

From-SVN: r80022

gcc/ChangeLog
gcc/expr.c

index 156d56b3fbaf54fcd62fa96f8336aedaf1fc910d..e60ed81dbee08a8cbc7ea8045dbff5799f5063b6 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * expr.c (store_constructor): Use gen_int_mode to correctly
+       sign-extend CONST_INT value.
+
 2004-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * builtin-types.def (BT_WINT, BT_FN_INT_WINT, BT_FN_WINT_WINT): New.
index d77b6e5d58730b2f942fbf464edcd0c3030fbe5c..fd129c115b2a9194893a8049721cc1d4cc783484 100644 (file)
@@ -5081,7 +5081,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
                {
                  if (word != 0 || ! cleared)
                    {
-                     rtx datum = GEN_INT (word);
+                     rtx datum = gen_int_mode (word, mode);
                      rtx to_rtx;
 
                      /* The assumption here is that it is safe to use