diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/cilk-plus/AN/side-effects-1.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/cilk-plus/AN/side-effects-1.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/side-effects-1.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/side-effects-1.c deleted file mode 100644 index 8b0034e727b..00000000000 --- a/gcc/testsuite/c-c++-common/cilk-plus/AN/side-effects-1.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcilkplus" } */ - -/* Test that the array index, limit, and stride are evaluated only - once. */ - -int array[1000]; - -int func1_times = 0; -int func2_times = 0; -int func3_times = 0; -int func1() { func1_times++; return 0; } -int func2() { func2_times++; return 0; } -int func3() { func3_times++; return 0; } - -int main() -{ - array[func1() + 11 : func2() + 22 : func3() + 33] = 666; - - if (func1_times != 1 - || func2_times != 1 - || func3_times != 1) - return 1; - - return 0; -} |