aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalaji V. Iyer <balaji.v.iyer@intel.com>2013-06-17 18:21:14 +0000
committerBalaji V. Iyer <bviyer@gcc.gnu.org>2013-06-17 11:21:14 -0700
commit758ed11f58c3be2d29297c0c55fc3ddf5d24b0f6 (patch)
tree2aa5409bd6ae9ea337f19f82c996ee95f8f4869a
parent8ed00d7651793b83e87b38cf67a48fa89f3b641d (diff)
downloadgcc-758ed11f58c3be2d29297c0c55fc3ddf5d24b0f6.zip
gcc-758ed11f58c3be2d29297c0c55fc3ddf5d24b0f6.tar.gz
gcc-758ed11f58c3be2d29297c0c55fc3ddf5d24b0f6.tar.bz2
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/sec_reduce_ind_same_value.c: New test. From-SVN: r200155
-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 3197f6e..a268ad2 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 0000000..34c6f12
--- /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;
+}
+