diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2011-07-26 18:48:20 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2011-07-26 18:48:20 +0000 |
commit | 7e806cfabd83ae8f89990d396f3838642e19ac76 (patch) | |
tree | 6f1ab422ef1ffc2c665342e56b765416b8ec2a44 /gcc/testsuite | |
parent | cbc1994b2f3fee67209b7476f62ea698902e39f3 (diff) | |
download | gcc-7e806cfabd83ae8f89990d396f3838642e19ac76.zip gcc-7e806cfabd83ae8f89990d396f3838642e19ac76.tar.gz gcc-7e806cfabd83ae8f89990d396f3838642e19ac76.tar.bz2 |
Add testcase for PR47593
2011-07-26 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/47653
* gcc.dg/graphite/run-id-pr47593.c: New.
From-SVN: r176803
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/graphite/run-id-pr47593.c | 29 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4efc523..d1fc84f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,11 @@ 2011-07-26 Sebastian Pop <sebastian.pop@amd.com> PR middle-end/47653 + * gcc.dg/graphite/run-id-pr47593.c: New. + +2011-07-26 Sebastian Pop <sebastian.pop@amd.com> + + PR middle-end/47653 * gcc.dg/graphite/run-id-pr47653.c: New. * gcc.dg/graphite/interchange-3.c: Do not use unsigned types for induction variables. diff --git a/gcc/testsuite/gcc.dg/graphite/run-id-pr47593.c b/gcc/testsuite/gcc.dg/graphite/run-id-pr47593.c new file mode 100644 index 0000000..6c8450e --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/run-id-pr47593.c @@ -0,0 +1,29 @@ +/* { dg-options "-O2 -fgraphite-identity -m32" } */ + +struct Foo { + int **p; + int **q; +}; + +int __attribute__((noinline)) +bar (void) +{ + struct Foo f; + int j, i = 1; + char *p; + int *x = &i; + int *y = &j; + f.p = &y; + f.q = &x; + p = (char *)&f; + for (j = 0; j < sizeof (int *); ++j) + p++; + return ***(int ***)p; +} +extern void abort (void); +int main() +{ + if (bar () != 1) + abort (); + return 0; +} |