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
2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
+ * c-array-notation.c (expand_array_notation_exprs): Added
+ ARRAY_NOTATION_REF case.
+
+2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
* c-array-notation.c (length_mismatch_in_expr_p): Moved this
function to c-family/array-notation-common.c.
(is_cilkplus_reduce_builtin): Likewise.
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;
}
+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.
+
2013-06-07 Jan Hubicka <jh@suse.cz>
* gcc.dg/tree-ssa/attr-alias.c: Remove brackets in template.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int A[10];
+
+int main () {
+ char c = (char)N; /* { dg-error "undeclared" } */
+ short s = (short)N;
+ long l = (long)N;
+ A[l:s:c];
+}
+
+/* { dg-message "note: each" "defined" { target *-*-* } 7 } */
+