aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorIgor Zamyatin <igor.zamyatin@intel.com>2014-08-01 16:54:27 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2014-08-01 16:54:27 +0000
commita7ee52fba0727d98eadb8b6b9adbf42cf88c0914 (patch)
tree6b22b92b1cb7eb59e88beb1c6e546153ce181301 /gcc/testsuite
parent663683746c390061ab8610b8dd848faa77f7e20a (diff)
downloadgcc-a7ee52fba0727d98eadb8b6b9adbf42cf88c0914.zip
gcc-a7ee52fba0727d98eadb8b6b9adbf42cf88c0914.tar.gz
gcc-a7ee52fba0727d98eadb8b6b9adbf42cf88c0914.tar.bz2
re PR c++/61455 (Internal compiler error, and other confused errors, when using array notation)
PR middle-end/61455 gcc/c-family/ * array-notation-common.c (extract_array_notation_exprs): Handling of DECL_EXPR added. gcc/c/ * c-array-notation.c (expand_array_notations): Handling of DECL_EXPR added. gcc/cp/ * cp-array-notation.c (expand_array_notation_exprs): Handling of DECL_EXPR improved. Changed handling for INIT_EXPR. gcc/testsuite/ * c-c++-common/cilk-plus/AN/pr61455.c: New test. * c-c++-common/cilk-plus/AN/pr61455-2.c: Likewise. From-SVN: r213491
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c13
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c9
3 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index cc4e3d1..95ebf2f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2014-07-08 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR middle-end/61455
+ * c-c++-common/cilk-plus/AN/pr61455.c: New test.
+ * c-c++-common/cilk-plus/AN/pr61455-2.c: Likewise.
+
2014-08-01 Jiong Wang <jiong.wang@arm.com>
* gcc.target/aarch64/legitimize_stack_var_before_reload_1.c: New
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c
new file mode 100644
index 0000000..60b4248
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c
@@ -0,0 +1,13 @@
+/* PR c++/61455 */
+/* { dg-options "-fcilkplus" } */
+
+int a[3] = {2, 3, 4};
+
+int main ()
+{
+ int c = 10;
+ int b = __sec_reduce_add(a[:]);
+ if (b+c != 19)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c
new file mode 100644
index 0000000..35a11b6
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c
@@ -0,0 +1,9 @@
+/* PR c++/61455 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+void foo ()
+{
+ int a[2];
+ int b = a[:]; /* { dg-error "cannot be scalar" } */
+}