aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-array-notation.c
diff options
context:
space:
mode:
authorBalaji V. Iyer <balaji.v.iyer@intel.com>2013-06-07 22:16:24 +0000
committerBalaji V. Iyer <bviyer@gcc.gnu.org>2013-06-07 15:16:24 -0700
commit1509bddad22c4f2e5c003c7a8845ba64fe367699 (patch)
treea280811b021c9ee416d3b6a275ee4b0d32bdb3fd /gcc/c/c-array-notation.c
parent88ac60d35f84f3067f64c5e76c2e13798b7da00e (diff)
downloadgcc-1509bddad22c4f2e5c003c7a8845ba64fe367699.zip
gcc-1509bddad22c4f2e5c003c7a8845ba64fe367699.tar.gz
gcc-1509bddad22c4f2e5c003c7a8845ba64fe367699.tar.bz2
re PR middle-end/57541 ([Cilkplus]: internal compiler error: in gimplify_expr, at gimplify.c:7809)
Fixed PR 57541. gcc/c/ChangeLog 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-array-notation.c (expand_array_notation_exprs): Added ARRAY_NOTATION_REF case. gcc/testsuite/ChangeLog 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com> PR middle-end/57541 * c-c++-common/cilk-plus/AN/pr57541.c: New test case. From-SVN: r199837
Diffstat (limited to 'gcc/c/c-array-notation.c')
-rw-r--r--gcc/c/c-array-notation.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c
index 7b13687..b1040da 100644
--- a/gcc/c/c-array-notation.c
+++ b/gcc/c/c-array-notation.c
@@ -2317,6 +2317,14 @@ expand_array_notation_exprs (tree t)
case RETURN_EXPR:
if (contains_array_notation_expr (t))
t = fix_return_expr (t);
+ return t;
+ case ARRAY_NOTATION_REF:
+ /* IF we are here, then we are dealing with cases like this:
+ A[:];
+ A[x:y:z];
+ A[x:y];
+ Replace those with just void zero node. */
+ t = void_zero_node;
default:
return t;
}