===================================================================
@@ -2317,6 +2317,14 @@
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;
}
===================================================================
@@ -0,0 +1,14 @@
+/* { 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 } */
+