diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-07 12:07:40 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-07 12:07:40 +0000 |
commit | 0822e32eed2c2f3aaf3b8ec63ee16772b2b970b2 (patch) | |
tree | 5034409087f7b7d9845d23cb22cf1e412f02c2b6 /gcc/testsuite/gcc.dg/autopar | |
parent | f169838ac346df666209dc62686101b3eb34c37a (diff) | |
download | gcc-0822e32eed2c2f3aaf3b8ec63ee16772b2b970b2.tar.gz |
2011-02-02 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged as suggest by Andread Schwab
http://gcc.gnu.org/ml/gcc/2011-02/msg00099.html
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@169880 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/autopar')
-rw-r--r-- | gcc/testsuite/gcc.dg/autopar/pr46194.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/autopar/pr46194.c b/gcc/testsuite/gcc.dg/autopar/pr46194.c new file mode 100644 index 00000000000..574d6e6722c --- /dev/null +++ b/gcc/testsuite/gcc.dg/autopar/pr46194.c @@ -0,0 +1,24 @@ +/* PR tree-optimization/46194 */ +/* { dg-do compile } */ +/* { dg-options "-O -ftree-parallelize-loops=2 -fdump-tree-parloops-details" } */ + +#define N 1000 +int a[N]; + +int foo (void) +{ + int j; + int i; + + /* This is not blocked as it is not profitable. */ + for (i = 0; i < N; i++) + for (j = 0; j < N; j++) + a[j] = a[i] + 1; + + return a[0]; +} + +/* This loop cannot be parallelized due to a dependence. */ + +/* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 0 "parloops" } } */ +/* { dg-final { cleanup-tree-dump "parloops" } } */ |