aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/multiple_insert_check.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/multiple_insert_check.cc')
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/multiple_insert_check.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/multiple_insert_check.cc b/gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/multiple_insert_check.cc
new file mode 100644
index 00000000000..edd3a93052e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/multiple_insert_check.cc
@@ -0,0 +1,17 @@
+int A[256];
+int func (int x) {
+ return x;
+}
+
+/* There was an error that some call exprs were inserted twice. This will
+ check that issue. */
+int main (int argc, char **argv)
+{
+ int x = 0;
+ A[:] = 4;
+ x = func (__sec_reduce_add(A[0:5:2])) + x;
+ if (x != 20)
+ return 1;
+ else
+ return 0;
+}