From 204567e54b0920c46fe9664721600d61d961009e Mon Sep 17 00:00:00 2001 From: bviyer Date: Mon, 17 Jun 2013 18:21:14 +0000 Subject: [PATCH] 2013-06-17 Balaji V. Iyer * 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 --- gcc/testsuite/ChangeLog | 4 ++++ .../cilk-plus/AN/sec_reduce_ind_same_value.c | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c 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 + + * c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c: New test. + +2013-06-17 Balaji V. Iyer * 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; +} + -- 2.11.4.GIT