diff options
author | bviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-15 22:05:48 +0000 |
---|---|---|
committer | bviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-15 22:05:48 +0000 |
commit | 2859d3e91893f01f1c29ff0a208c8cadd2c86387 (patch) | |
tree | 8ded6af3d368a0ec7a709d33952a6468782e3598 | |
parent | 90df13422c436b3fdc4f7f642f7a27b0f2505075 (diff) |
2013-08-15 Balaji V. Iyer <balaji.v.iyer@intel.com>
* g++.dg/cilk-plus/array_notation_tests/execute/testcase01.cc: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/cilkplus@201775 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog.cilkplus | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/testcase01.cc | 27 |
2 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog.cilkplus b/gcc/testsuite/ChangeLog.cilkplus index 7e49b6dbdc1..e719e00d2ee 100644 --- a/gcc/testsuite/ChangeLog.cilkplus +++ b/gcc/testsuite/ChangeLog.cilkplus @@ -1,3 +1,7 @@ +2013-08-15 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * g++.dg/cilk-plus/array_notation_tests/execute/testcase01.cc: New test. + 2013-04-05 Balaji V. Iyer <balaji.v.iyer@intel.com> * gcc.dg/cilk-plus/cilk_keywords_test/execute/execute.exp: Added unique diff --git a/gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/testcase01.cc b/gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/testcase01.cc new file mode 100644 index 00000000000..92359f87018 --- /dev/null +++ b/gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/execute/testcase01.cc @@ -0,0 +1,27 @@ + +#define N 16 + +int main(int argc, char **argv) { + + int x = 0; + float a[N]; + float b[N]; + + a[:] = 1; + b[:] = 2; + + if (a[:] > 0) { + x++; + } + + // Some operations + a[:] = 3; + b[:] = a[:]; + + if (b[0] != 3) + return 1; + else if (x != N) + return 2; + + return 0; +} |