summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog.cilkplus5
-rw-r--r--gcc/cp/cp-cilk.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog.cilkplus b/gcc/cp/ChangeLog.cilkplus
index 5fc31585234..aedde1e4c58 100644
--- a/gcc/cp/ChangeLog.cilkplus
+++ b/gcc/cp/ChangeLog.cilkplus
@@ -1,3 +1,8 @@
+2013-10-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * cp-cilk.c (cilk_validate_for): Fixed a bug by checking for a variable
+ for integer instead of its type.
+
2013-08-15 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cp-array-notation.c (find_inv_trees): Added a check for VAR_DECL
diff --git a/gcc/cp/cp-cilk.c b/gcc/cp/cp-cilk.c
index b544d851100..0903db138df 100644
--- a/gcc/cp/cp-cilk.c
+++ b/gcc/cp/cp-cilk.c
@@ -1432,7 +1432,7 @@ cilk_validate_for (tree c_for_stmt)
return false;
}
else if (!TYPE_UNSIGNED (grain_type)
- && (TREE_CODE (grain_type) == INTEGER_TYPE)
+ && (TREE_CODE (grain) == INTEGER_CST)
&& (TREE_INT_CST_HIGH (grain) < 0))
{
warning (OPT_Wcilk_for,