diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 5fbb31f..caf2146 100644
Binary files a/gcc/c/ChangeLog and b/gcc/c/ChangeLog differ
diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c
index b1040da..1914a24 100644
--- a/gcc/c/c-array-notation.c
+++ b/gcc/c/c-array-notation.c
@@ -133,7 +133,7 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
   bool **count_down, **array_vector;
   location_t location = UNKNOWN_LOCATION;
   tree loop_with_init = alloc_stmt_list ();
-  
+  tree new_comp_expr = NULL_TREE, identity_expr = NULL_TREE;
   enum built_in_function an_type =
     is_cilkplus_reduce_builtin (CALL_EXPR_FN (an_builtin_fn));
   if (an_type == BUILT_IN_NONE)
@@ -483,10 +483,12 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
       new_yes_expr = build_modify_expr
 	(location, *new_var, TREE_TYPE (*new_var), NOP_EXPR,
 	 location, func_parm, TREE_TYPE (*new_var));
-      new_expr = build_conditional_expr
-	(location,
-	 build2 (LT_EXPR, TREE_TYPE (*new_var), *new_var, func_parm), false,
-	 new_yes_expr, TREE_TYPE (*new_var), new_no_expr, TREE_TYPE (*new_var));
+      new_comp_expr = build2 (LT_EXPR, TREE_TYPE (*new_var), *new_var,
+			      build_c_cast (location, TREE_TYPE (*new_var),
+					    func_parm));
+      new_expr = build_conditional_expr (location, new_comp_expr, false,
+					 new_yes_expr, TREE_TYPE (*new_var),
+					 new_no_expr, TREE_TYPE (*new_var));
       break;
     case BUILT_IN_CILKPLUS_SEC_REDUCE_MIN:
       if (TYPE_MAX_VALUE (new_var_type))
@@ -503,10 +505,12 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
       new_yes_expr = build_modify_expr
 	(location, *new_var, TREE_TYPE (*new_var), NOP_EXPR,
 	 location, func_parm, TREE_TYPE (*new_var));
-      new_expr = build_conditional_expr
-	(location,
-	 build2 (GT_EXPR, TREE_TYPE (*new_var), *new_var, func_parm), false,
-	 new_yes_expr, TREE_TYPE (*new_var), new_no_expr, TREE_TYPE (*new_var));
+      new_comp_expr = build2 (GT_EXPR, TREE_TYPE (*new_var), *new_var,
+			      build_c_cast (location, TREE_TYPE (*new_var),
+					    func_parm));
+      new_expr = build_conditional_expr (location, new_comp_expr, false,
+					 new_yes_expr, TREE_TYPE (*new_var),
+					 new_no_expr, TREE_TYPE (*new_var));
       break;
     case BUILT_IN_CILKPLUS_SEC_REDUCE_MAX_IND:
       new_var_init = build_modify_expr
@@ -551,12 +555,13 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
       append_to_statement_list (new_no_ind, &new_no_list);
       append_to_statement_list (new_no_expr, &new_no_list);
  
+      new_comp_expr =
+	build2 (LE_EXPR, TREE_TYPE (array_ind_value), array_ind_value,
+		build_c_cast (location, TREE_TYPE (array_ind_value),
+			      func_parm));
       new_expr = build_conditional_expr
-	(location,
-	 build2 (LE_EXPR, TREE_TYPE (array_ind_value), array_ind_value,
-		 func_parm),
-	 false,
-	 new_yes_list, TREE_TYPE (*new_var), new_no_list, TREE_TYPE (*new_var));
+	(location, new_comp_expr, false,  new_yes_list, TREE_TYPE (*new_var),
+	 new_no_list, TREE_TYPE (*new_var));
       break;
     case BUILT_IN_CILKPLUS_SEC_REDUCE_MIN_IND:
       new_var_init = build_modify_expr
@@ -601,24 +606,34 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
       append_to_statement_list (new_no_ind, &new_no_list);
       append_to_statement_list (new_no_expr, &new_no_list);
  
+      new_comp_expr =
+	build2 (GE_EXPR, TREE_TYPE (array_ind_value), array_ind_value,
+		build_c_cast (location, TREE_TYPE (array_ind_value),
+			      func_parm));
       new_expr = build_conditional_expr
-	(location,
-	 build2 (GE_EXPR, TREE_TYPE (array_ind_value), array_ind_value,
-		 func_parm),
-	 false,
-	 new_yes_list, TREE_TYPE (*new_var), new_no_list, TREE_TYPE (*new_var));
+	(location, new_comp_expr, false, new_yes_list, TREE_TYPE (*new_var),
+	 new_no_list, TREE_TYPE (*new_var));
       break;
     case BUILT_IN_CILKPLUS_SEC_REDUCE:
       new_var_init = build_modify_expr
 	(location, *new_var, TREE_TYPE (*new_var), NOP_EXPR,
 	 location, identity_value, new_var_type);
-      new_call_expr = build_call_expr (call_fn, 2, *new_var, func_parm);
+      new_call_expr = build_call_expr (call_fn, 2, *new_var,
+				       build_c_cast (location, new_var_type,
+						     func_parm));
       new_expr = build_modify_expr
 	(location, *new_var, TREE_TYPE (*new_var), NOP_EXPR,
 	 location, new_call_expr, TREE_TYPE (*new_var));
       break;
     case BUILT_IN_CILKPLUS_SEC_REDUCE_MUTATING:
-      new_expr = build_call_expr (call_fn, 2, identity_value, func_parm);
+      if (TREE_CODE (TREE_TYPE (identity_value)) == POINTER_TYPE)
+	new_var_type = TREE_TYPE (TREE_TYPE (identity_value));
+      identity_expr = TREE_OPERAND (identity_value, 0);
+      identity_value = build_fold_addr_expr (identity_expr);
+      TREE_USED (identity_expr) = 1;
+      new_expr = build_call_expr (call_fn, 2, identity_value,
+				  build_c_cast (location, new_var_type,
+						func_parm));
       break;
     default:
       gcc_unreachable ();
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b8fe362..6c6c50c 100644
Binary files a/gcc/testsuite/ChangeLog and b/gcc/testsuite/ChangeLog differ
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_mutating.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_mutating.c
index 6635565..7c194c2 100644
--- a/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_mutating.c
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_mutating.c
@@ -44,11 +44,11 @@ int main(void)
   max_value = array3[0] * array4[0];
   for (ii = 0; ii < 10; ii++)
     if (array3[ii] * array4[ii] > max_value) {
-      max_value = array3[ii] * array4[ii];
       max_index = ii;
     }
     
-  
+  for (ii = 0; ii < 10; ii++)
+    my_func (&max_value, array3[ii] * array4[ii]);
   
 #if HAVE_IO
   for (ii = 0; ii < 10; ii++) 
