diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/test_sec_limits.cc')
-rw-r--r-- | gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/test_sec_limits.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/test_sec_limits.cc b/gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/test_sec_limits.cc new file mode 100644 index 00000000000..f8dd4e49413 --- /dev/null +++ b/gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/test_sec_limits.cc @@ -0,0 +1,28 @@ +/* { dg-do run } */ +/* { dg-options "-fcilkplus" } */ + +#if HAVE_IO +#include <iostream> +#endif +#include <limits.h> +int A[16]; +int a = 0; + +int main () { + if (__sec_reduce_max(A[0:0:2]) != INT_MIN) { +#if HAVE_IO + std::cout << __sec_reduce_max(A[0:0:2]) << std::endl; +#endif + a++; + } + if (__sec_reduce_min(A[0:0:2]) != INT_MAX) { +#if HAVE_IO + std::cout << __sec_reduce_min(A[0:0:2]) << std::endl; +#endif + a++; + } + + return a; +} + + |