From 671a475e64d77f16b3fbc5aad349be68828c1318 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Fri, 22 Aug 2014 09:37:01 +0000 Subject: re PR other/62008 (CilkPlus Array Notation ICE in build_array_notation_ref when trying to build a multidimensional array from a pointer.) PR other/62008 gcc/c/ * c-parser.c (c_parser_array_notation): Check for correct type of an array added. gcc/cp/ * cp-array-notation.c (build_array_notation_ref): Added correct handling of case with incorrect array. gcc/testsuite/ * c-c++-common/cilk-plus/AN/pr62008.c: New test. From-SVN: r214305 --- gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c (limited to 'gcc/testsuite/c-c++-common') diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c new file mode 100644 index 0000000..05734c5 --- /dev/null +++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c @@ -0,0 +1,10 @@ +/* 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 } */ +} -- cgit v1.1