]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
calls.c (store_one_arg): Remove incorrect const qualification on the type of the...
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 20 Mar 2014 11:35:22 +0000 (11:35 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 20 Mar 2014 11:35:22 +0000 (11:35 +0000)
* calls.c (store_one_arg): Remove incorrect const qualification on the
type of the temporary.
* cfgexpand.c (expand_return): Likewise.
* expr.c (expand_constructor): Likewise.
(expand_expr_real_1): Likewise.

From-SVN: r208694

gcc/ChangeLog
gcc/calls.c
gcc/cfgexpand.c
gcc/expr.c

index c72bbe3985b8f27fc41ad5847d2610573e0e408a..f0640642d88d92a3c5b9e1df764b40ae2b9d760d 100644 (file)
@@ -1,3 +1,11 @@
+2014-03-20  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * calls.c (store_one_arg): Remove incorrect const qualification on the
+       type of the temporary.
+       * cfgexpand.c (expand_return): Likewise.
+       * expr.c (expand_constructor): Likewise.
+       (expand_expr_real_1): Likewise.
+
 2014-03-20  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
 
        * config/arm/arm.c (arm_dwarf_register_span): Update the element number
index f392319cfddf9ce0a2f4828017c2839ad65872d1..f0c92ddc0182d3216a90e0dc06e9b3a40bca9a45 100644 (file)
@@ -4451,11 +4451,8 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
 
              if (save_mode == BLKmode)
                {
-                 tree ot = TREE_TYPE (arg->tree_value);
-                 tree nt = build_qualified_type (ot, (TYPE_QUALS (ot)
-                                                      | TYPE_QUAL_CONST));
-
-                 arg->save_area = assign_temp (nt, 1, 1);
+                 arg->save_area
+                   = assign_temp (TREE_TYPE (arg->tree_value), 1, 1);
                  preserve_temp_slots (arg->save_area);
                  emit_block_move (validize_mem (arg->save_area), stack_area,
                                   GEN_INT (arg->locate.size.constant),
index dd163a5f8c5e76e1adea1f211cfc9198f500e95f..b7f63602d99dba766d99480149de1b6fd14e8d7a 100644 (file)
@@ -3105,15 +3105,11 @@ expand_return (tree retval)
           && (REG_P (result_rtl)
               || (GET_CODE (result_rtl) == PARALLEL)))
     {
-      /* Calculate the return value into a temporary (usually a pseudo
-         reg).  */
-      tree ot = TREE_TYPE (DECL_RESULT (current_function_decl));
-      tree nt = build_qualified_type (ot, TYPE_QUALS (ot) | TYPE_QUAL_CONST);
-
-      val = assign_temp (nt, 0, 1);
+      /* Compute the return value into a temporary (usually a pseudo reg).  */
+      val
+       = assign_temp (TREE_TYPE (DECL_RESULT (current_function_decl)), 0, 1);
       val = expand_expr (retval_rhs, val, GET_MODE (val), EXPAND_NORMAL);
       val = force_not_mem (val);
-      /* Return the calculated value.  */
       expand_value_return (val);
     }
   else
index be62c539e25d62eba0f708b0f3a5f48a6731ae64..2dcdfc261551ef4ef4aa3eeeef68b2a11d52442d 100644 (file)
@@ -7867,11 +7867,7 @@ expand_constructor (tree exp, rtx target, enum expand_modifier modifier,
       if (avoid_temp_mem)
        return NULL_RTX;
 
-      target
-       = assign_temp (build_qualified_type (type, (TYPE_QUALS (type)
-                                                   | (TREE_READONLY (exp)
-                                                      * TYPE_QUAL_CONST))),
-                      TREE_ADDRESSABLE (exp), 1);
+      target = assign_temp (type, TREE_ADDRESSABLE (exp), 1);
     }
 
   store_constructor (exp, target, 0, int_expr_size (exp));
@@ -10088,10 +10084,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
           and need be, put it there.  */
        else if (CONSTANT_P (op0) || (!MEM_P (op0) && must_force_mem))
          {
-           tree nt = build_qualified_type (TREE_TYPE (tem),
-                                           (TYPE_QUALS (TREE_TYPE (tem))
-                                            | TYPE_QUAL_CONST));
-           memloc = assign_temp (nt, 1, 1);
+           memloc = assign_temp (TREE_TYPE (tem), 1, 1);
            emit_move_insn (memloc, op0);
            op0 = memloc;
            mem_attrs_from_type = true;