Add gcc.dg/pr46032-{2,3}.c test-cases
2015-11-30 Tom de Vries <tom@codesourcery.com> * gcc.dg/pr46032-2.c: New test. * gcc.dg/pr46032-3.c: New test. From-SVN: r231079
This commit is contained in:
parent
34ea150cdc
commit
522cdabdea
3 changed files with 62 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-11-30 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* gcc.dg/pr46032-2.c: New test.
|
||||
* gcc.dg/pr46032-3.c: New test.
|
||||
|
||||
2015-11-30 Charles Baylis <charles.baylis@linaro.org>
|
||||
|
||||
PR target/63870
|
||||
|
|
29
gcc/testsuite/gcc.dg/pr46032-2.c
Normal file
29
gcc/testsuite/gcc.dg/pr46032-2.c
Normal file
|
@ -0,0 +1,29 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fopenmp -std=c99 -fipa-pta -fdump-tree-optimized" } */
|
||||
|
||||
#define N 2
|
||||
|
||||
int
|
||||
foo (void)
|
||||
{
|
||||
int a[N], b[N], c[N];
|
||||
int *ap = &a[0];
|
||||
int *bp = &b[0];
|
||||
int *cp = &c[0];
|
||||
|
||||
#pragma omp parallel for
|
||||
for (unsigned int idx = 0; idx < N; idx++)
|
||||
{
|
||||
ap[idx] = 1;
|
||||
bp[idx] = 2;
|
||||
cp[idx] = ap[idx];
|
||||
}
|
||||
|
||||
return *cp;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "\\] = 1;" 2 "optimized" } } */
|
||||
/* { dg-final { scan-tree-dump-times "\\] = 2;" 1 "optimized" } } */
|
||||
/* { dg-final { scan-tree-dump-times "\\] = _\[0-9\]*;" 0 "optimized" } } */
|
||||
/* { dg-final { scan-tree-dump-times "\\] = " 3 "optimized" } } */
|
||||
|
28
gcc/testsuite/gcc.dg/pr46032-3.c
Normal file
28
gcc/testsuite/gcc.dg/pr46032-3.c
Normal file
|
@ -0,0 +1,28 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fopenmp -std=c99 -fipa-pta -fdump-tree-optimized" } */
|
||||
|
||||
#define N 2
|
||||
|
||||
int
|
||||
foo (void)
|
||||
{
|
||||
int a[N], c[N];
|
||||
int *ap = &a[0];
|
||||
int *bp = &a[0];
|
||||
int *cp = &c[0];
|
||||
|
||||
#pragma omp parallel for
|
||||
for (unsigned int idx = 0; idx < N; idx++)
|
||||
{
|
||||
ap[idx] = 1;
|
||||
bp[idx] = 2;
|
||||
cp[idx] = ap[idx];
|
||||
}
|
||||
|
||||
return *cp;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "\\] = 1;" 1 "optimized" } } */
|
||||
/* { dg-final { scan-tree-dump-times "\\] = 2;" 1 "optimized" } } */
|
||||
/* { dg-final { scan-tree-dump-times "\\] = _\[0-9\]*;" 1 "optimized" } } */
|
||||
/* { dg-final { scan-tree-dump-times "\\] = " 3 "optimized" } } */
|
Loading…
Add table
Reference in a new issue