aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-21 15:31:38 +0000
committerbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-21 15:31:38 +0000
commit6bca773ec74506b2911ff1b48b32878de064740f (patch)
tree9eff4de2ac0d27a51c18f95d1726bfc6b0d01131
parent0b4a2762c0bdd7c567badd7e6e9a302708bd2b21 (diff)
Fixed a bug in Cilk for grainsize.cilkplus
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/cilkplus@203896 138bc75d-0d04-0410-961f-82ee72b054a4
-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,