aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalaji V. Iyer <balaji.v.iyer@intel.com>2013-05-09 18:18:44 +0000
committerBalaji V. Iyer <balaji.v.iyer@intel.com>2013-05-09 18:18:44 +0000
commita9440fc606d200eb09450f3fbcb7c85362622d62 (patch)
tree9b97851252ba6dbe53ea7d38685a28b257cf7c7c
parent77a1398285c6deaa92a815e4db9d678f8e283777 (diff)
Removed an unwanted error message.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/cilkplus@198750 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog.cilkplus1
-rw-r--r--gcc/cp/cp-cilk.c13
2 files changed, 4 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog.cilkplus b/gcc/cp/ChangeLog.cilkplus
index 916dc00d715..a219bab3445 100644
--- a/gcc/cp/ChangeLog.cilkplus
+++ b/gcc/cp/ChangeLog.cilkplus
@@ -5,6 +5,7 @@
If so, then we are certain that we have a operation equal instead of
just operation. Thus, handle it appropriately using modify expressions.
(callable): Likewise.
+ (validate_for_record): Removed an unwanted error message.
2013-05-08 Balaji V. Iyer <balaji.v.iyer@intel.com>
diff --git a/gcc/cp/cp-cilk.c b/gcc/cp/cp-cilk.c
index be97519ef27..b544d851100 100644
--- a/gcc/cp/cp-cilk.c
+++ b/gcc/cp/cp-cilk.c
@@ -1314,7 +1314,8 @@ validate_for_scalar (tree c_for_stmt, tree var)
return true;
}
-/* This function will check if _Cilk_for loop is valid. */
+/* Returns true if C_FOR_STMT, a CILK_FOR_STMT tree with the induction
+ variable VAR, a VAR_DECL, is valid. */
static bool
validate_for_record (tree c_for_stmt, tree var)
@@ -1323,7 +1324,7 @@ validate_for_record (tree c_for_stmt, tree var)
tree exp_cond = NULL_TREE;
tree l_type = NULL_TREE, d_type = NULL_TREE, d_type_up = NULL_TREE;
tree d_type_down = NULL_TREE;
- tree var_type = NULL_TREE, cond = NULL_TREE, limit = NULL_TREE;
+ tree cond = NULL_TREE, limit = NULL_TREE;
tree hack = NULL_TREE;
int direction = 0;
@@ -1333,8 +1334,6 @@ validate_for_record (tree c_for_stmt, tree var)
if (!limit)
return false;
- var_type = TREE_TYPE (var);
-
l_type = TREE_TYPE (limit);
hack = build_decl (UNKNOWN_LOCATION, VAR_DECL, get_identifier ("loop_bound"),
@@ -1372,12 +1371,6 @@ validate_for_record (tree c_for_stmt, tree var)
if (!exp_plus)
return false;
- if (TYPE_MAIN_VARIANT (TREE_TYPE (exp_plus)) != var_type
- && !can_convert_arg (var_type, TREE_TYPE (exp_plus), exp_plus, 0,
- tf_warning_or_error))
- error ("result of operation%c(%T,%T) not convertable to type of loop var.",
- (direction >= 0) ? '+' : '-', var_type, d_type);
-
if (cp_tree_uses_cilk (exp_plus)
|| cp_tree_uses_cilk (callable (INIT_EXPR, NULL_TREE, var, 0, false))
|| cp_tree_uses_cilk (callable (PSEUDO_DTOR_EXPR, NULL_TREE, var, 0,