diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-08 15:28:01 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-08 15:28:01 +0000 |
commit | 8b0287e29e6ba2f51498ab6a0bbfb4d30371aafe (patch) | |
tree | 1efa0d6fbc6e7f4dd31d427ac6c423dc2e46bc4e /libgomp | |
parent | 3b967909afb128008572e8ddb84033994789f771 (diff) | |
download | gcc-8b0287e29e6ba2f51498ab6a0bbfb4d30371aafe.tar.gz |
2012-03-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46886
* tree-flow.h (do_while_loop_p): Declare.
* tree-ssa-loop-ch.c (do_while_loop_p): Export.
* tree-parloops.c (parallelize_loops): Only parallelize do-while
loops.
* testsuite/libgomp.c/pr46886.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184010 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr46886.c | 28 |
2 files changed, 33 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 8d9015d680d..daebf23e69e 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2012-02-08 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/46886 + * testsuite/libgomp.c/pr46886.c: New testcase. + 2012-01-25 Matthias Klose <doko@ubuntu.com> * config/linux/arm: Remove empty directory. diff --git a/libgomp/testsuite/libgomp.c/pr46886.c b/libgomp/testsuite/libgomp.c/pr46886.c new file mode 100644 index 00000000000..fbdc4e130d3 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/pr46886.c @@ -0,0 +1,28 @@ +/* { dg-do run } */ +/* { dg-options "-O -ftree-parallelize-loops=4 -fno-tree-ch -fno-tree-dominator-opts" } */ + +void abort(void); + +int d[1024], e[1024]; + +int foo (void) +{ + int s = 0; + int i; + for (i = 0; i < 1024; i++) + s += d[i] - e[i]; + return s; +} + +int main () +{ + int i; + for (i = 0; i < 1024; i++) + { + d[i] = i * 2; + e[i] = i; + } + if (foo () != 1023 * 1024 / 2) + abort (); + return 0; +} |