+2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR other/62008
+ * c-parser.c (c_parser_array_notation): Check for correct
+ type of an array added.
+
2014-08-19 Marek Polacek <polacek@redhat.com>
PR c++/62153
array_type = TREE_TYPE (array_value);
gcc_assert (array_type);
+ if (TREE_CODE (array_type) != ARRAY_TYPE
+ && TREE_CODE (array_type) != POINTER_TYPE)
+ {
+ error_at (loc, "base of array section must be pointer or array type");
+ c_parser_skip_until_found (parser, CPP_CLOSE_SQUARE, NULL);
+ return error_mark_node;
+ }
type = TREE_TYPE (array_type);
token = c_parser_peek_token (parser);
+2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR other/62008
+ * cp-array-notation.c (build_array_notation_ref): Added correct
+ handling of case with incorrect array.
+
2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
if (TREE_CODE (type) == ARRAY_TYPE || TREE_CODE (type) == POINTER_TYPE)
TREE_TYPE (array_ntn_expr) = TREE_TYPE (type);
else
- gcc_unreachable ();
+ {
+ error_at (loc, "base of array section must be pointer or array type");
+ return error_mark_node;
+ }
SET_EXPR_LOCATION (array_ntn_expr, loc);
return array_ntn_expr;
+2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR other/62008
+ * c-c++-common/cilk-plus/AN/pr62008.c: New test.
+
2014-08-22 Tony Wang <tony.wang@arm.com>
* g++.dg/tls/thread_local6.C: Skip this test case when target uses
--- /dev/null
+/* PR other/62008 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+void f(int *a, int w, int h)
+{
+ int tmp[w][h];
+ tmp[:][:] = a[0:w][0:h]; /* { dg-error "base of array section must be pointer or array type" } */
+ /* { dg-error "start-index and length fields necessary" "" { target c } 8 } */
+}