c-array-notation.c (fix_builtin_array_notation_fn): Fix final argument to build_modif...
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 28 Apr 2016 22:00:19 +0000 (22:00 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 28 Apr 2016 22:00:19 +0000 (16:00 -0600)
2016-04-28  Andrew MacLeod  <amacleod@redhat.com>

* c-array-notation.c (fix_builtin_array_notation_fn): Fix final
argument to build_modify_expr in two cases.

From-SVN: r235614

gcc/c/ChangeLog
gcc/c/c-array-notation.c

index a641721bece315de5dab0b4794bb15640484ed20..5161f7d56df22e62eca35bcee7e41d9da73eac17 100644 (file)
@@ -1,3 +1,8 @@
+2016-04-28  Andrew MacLeod  <amacleod@redhat.com>
+
+       * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
+       argument to build_modify_expr in two cases.
+
 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
 
        * c-parser.c (c_parser_postfix_expression_after_primary): Call
index 716bd119ffc787dd793c803a7933cefd618e01cb..c7cf66a2c817b3e713de3076c447dd6cf5cb579a 100644 (file)
@@ -489,7 +489,7 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
          new_yes_expr = build_modify_expr
            (location, array_ind_value, TREE_TYPE (array_ind_value),
             NOP_EXPR,
-            location, func_parm, TREE_OPERAND (array_op0, 1));
+            location, func_parm, TREE_TYPE (TREE_OPERAND (array_op0, 1)));
        }
       new_yes_list = alloc_stmt_list ();
       append_to_statement_list (new_yes_ind, &new_yes_list);
@@ -539,7 +539,7 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
          new_yes_expr = build_modify_expr
            (location, array_ind_value, TREE_TYPE (array_ind_value),
             NOP_EXPR,
-            location, func_parm, TREE_OPERAND (array_op0, 1));
+            location, func_parm, TREE_TYPE (TREE_OPERAND (array_op0, 1)));
        }
       new_yes_list = alloc_stmt_list ();
       append_to_statement_list (new_yes_ind, &new_yes_list);