diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-05 22:25:29 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-05 22:25:29 +0000 |
commit | 7deddfded2d013c07a639873a4c90bfed40fd03e (patch) | |
tree | 3df2a52207fec5bec55c28303aa57a8bd9b4e620 /gcc/testsuite/gcc.dg/autopar | |
parent | c79b54af83c8031caac515081fb7c56a127b90e3 (diff) | |
download | gcc-7deddfded2d013c07a639873a4c90bfed40fd03e.tar.gz |
2010-11-05 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 166377
2010-11-05 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 166377
* gcc/Makefile.in (MELT_RAW_CFLAGS): removed LIBELFINC
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@166380 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/autopar')
-rw-r--r-- | gcc/testsuite/gcc.dg/autopar/pr46099.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/autopar/pr46099.c b/gcc/testsuite/gcc.dg/autopar/pr46099.c new file mode 100644 index 00000000000..074278e644b --- /dev/null +++ b/gcc/testsuite/gcc.dg/autopar/pr46099.c @@ -0,0 +1,47 @@ +/* PR tree-optimization/46099 */ +/* { dg-do compile } */ +/* { dg-options "-ftree-parallelize-loops=2 -fcompare-debug -O" } */ + +static inline void +bar (int *i) +{ + int j = *i; +} + +void baz (int *, int *, int *); + +void +f1 (int n) +{ + int i; + for (i = 0; i < n; i++) + bar (&i); +} + +void +f2 (int n) +{ + int i; + int a[10000], b[10000], c[10000]; + baz (a, b, c); + for (i = 0; i < n; i++) + { + void *p = c; + a[i] = b[i] + c[i]; + } + baz (a, b, c); +} + +void +f3 (int n) +{ + int i; + int a[10000], b[10000], c[10000]; + baz (a, b, c); + for (i = 0; i < n; i++) + { + a[i] = b[i] + c[i]; + void *p = c; + } + baz (a, b, c); +} |