summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-17 18:21:14 +0000
committerbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-17 18:21:14 +0000
commit204567e54b0920c46fe9664721600d61d961009e (patch)
tree2aa5409bd6ae9ea337f19f82c996ee95f8f4869a
parent98044fac98832306465f180eb7eb7a90859abc6e (diff)
downloadgcc-204567e54b0920c46fe9664721600d61d961009e.tar.gz
2013-06-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200155 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c21
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3197f6e6e85..a268ad2106c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,8 @@
2013-06-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c: New test.
+
+2013-06-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-c++-common/cilk-plus/AN/array_test1.c: Make this an execution test.
Also changed the returns from error as distinct values so that it is
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c
new file mode 100644
index 00000000000..34c6f12846d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+int A[256];
+
+int main () {
+ A[:] = 2;
+ int max_index = 0, min_index = 0;
+
+ max_index = __sec_reduce_max_ind (A[:]);
+
+ if (max_index != 255)
+ return 1;
+
+ min_index = __sec_reduce_min_ind (A[:]);
+ if (min_index != 255)
+ return 2;
+
+ return 0;
+}
+