diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2011-07-26 18:47:44 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2011-07-26 18:47:44 +0000 |
commit | 4c7d675552917db06371e5316b6a170b246a0653 (patch) | |
tree | eb8c91e40946cf110afb23ca04d3f96c9b631c4a /gcc/testsuite | |
parent | bf03b9ffeca63804bbdaafe308279b42caa0e2be (diff) | |
download | gcc-4c7d675552917db06371e5316b6a170b246a0653.zip gcc-4c7d675552917db06371e5316b6a170b246a0653.tar.gz gcc-4c7d675552917db06371e5316b6a170b246a0653.tar.bz2 |
Fix PR48805: Do not instantiate ADDR_EXPRs
With this patch we avoid instantiating ADDR_EXPR: it makes no sense
to translate &b[i] into &b[{0, +, 1}_1].
Bootstrapped and tested on amd64-linux.
2011-07-26 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/48805
* tree-scalar-evolution.c (instantiate_scev_r): Return
chrec_dont_know for ADDR_EXPR.
* gcc.dg/graphite/id-pr48805.c: New.
From-SVN: r176801
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/graphite/id-pr48805.c | 20 |
2 files changed, 26 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1e351fe..4e0adb1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-07-26 Sebastian Pop <sebastian.pop@amd.com> + + PR middle-end/48805 + * gcc.dg/graphite/id-pr48805.c: New. + 2011-07-26 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray_lib_token_2.f90: New. @@ -12,7 +17,7 @@ PR tree-opt/49671 * gcc.dg/tree-ssa/pr49671-1.c: New testcase. * gcc.dg/tree-ssa/pr49671-2.c: New testcase. - + 2011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * lib/target-supports.exp (check_effective_target_mmap): New proc. diff --git a/gcc/testsuite/gcc.dg/graphite/id-pr48805.c b/gcc/testsuite/gcc.dg/graphite/id-pr48805.c new file mode 100644 index 0000000..f13a828 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/id-pr48805.c @@ -0,0 +1,20 @@ +void *A(const void *a); +void C(void); + +static void B(unsigned short a[]) +{ + long i, j, tmp; + + for(i = 0; i < 3; i++) { + for(j = 1; j <= 3; j++) + tmp -= a[i - j]; + + a[i] = (unsigned short)(tmp >> 1); + } +} +void C(void) +{ + unsigned short a[3], b[3]; + B(b + 1); + A(a); +} |