diff options
author | Balaji V. Iyer <balaji.v.iyer@intel.com> | 2013-07-19 15:15:40 +0000 |
---|---|---|
committer | Balaji V. Iyer <balaji.v.iyer@intel.com> | 2013-07-19 15:15:40 +0000 |
commit | 8dbe5b5ab099a10a78f0d81081691a2f3c93be05 (patch) | |
tree | 1ea594003e2d7175bb13640f24a67d61322eb899 | |
parent | a5f7e06d40ca30d24159306d91ee4dc7ecf4ef29 (diff) |
Added INDIRECT REF checks for array notation extract.
gcc/ChangeLog.cilkplus
+2013-07-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c/c-array-notation.c (find_rank): Added INDIRECT_REF case.
+ (build_array_notation_expr): Likewise.
+
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/cilkplus@201063 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.cilkplus | 5 | ||||
-rw-r--r-- | gcc/c/c-array-notation.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog.cilkplus b/gcc/ChangeLog.cilkplus index b378b0bdca0..dfcab2ee658 100644 --- a/gcc/ChangeLog.cilkplus +++ b/gcc/ChangeLog.cilkplus @@ -1,3 +1,8 @@ +2013-07-19 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * c/c-array-notation.c (find_rank): Added INDIRECT_REF case. + (build_array_notation_expr): Likewise. + 2013-07-07 Balaji V. Iyer <balaji.v.iyer@intel.com> * config/i386/i386.c (ix86_cilkplus_find_isa_code): New function. diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c index 52a2df02e4d..3683f22b2c8 100644 --- a/gcc/c/c-array-notation.c +++ b/gcc/c/c-array-notation.c @@ -121,6 +121,7 @@ find_rank (tree array, bool ignore_builtin_fn, size_t *rank) else if (TREE_CODE (ii_tree) == ARRAY_REF) ii_tree = TREE_OPERAND (ii_tree, 0); else if (TREE_CODE (ii_tree) == PARM_DECL + || TREE_CODE (ii_tree) == INDIRECT_REF || TREE_CODE (ii_tree) == VAR_DECL) break; } @@ -731,6 +732,7 @@ build_array_notation_expr (location_t location, tree lhs, tree lhs_origtype, else if (TREE_CODE (ii_tree) == ARRAY_REF) ii_tree = TREE_OPERAND (ii_tree, 0); else if (TREE_CODE (ii_tree) == VAR_DECL + || TREE_CODE (ii_tree) == INDIRECT_REF || TREE_CODE (ii_tree) == PARM_DECL) break; } @@ -759,9 +761,9 @@ build_array_notation_expr (location_t location, tree lhs, tree lhs_origtype, else if (TREE_CODE (ii_tree) == ARRAY_REF) ii_tree = TREE_OPERAND (ii_tree, 0); else if (TREE_CODE (ii_tree) == VAR_DECL - || TREE_CODE (ii_tree) == PARM_DECL) - break; - else if (TREE_CODE (ii_tree) == CALL_EXPR) + || TREE_CODE (ii_tree) == PARM_DECL + || TREE_CODE (ii_tree) == CALL_EXPR + || TREE_CODE (ii_tree) == INDIRECT_REF) break; } } |