diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-13 14:24:59 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-13 14:24:59 +0000 |
commit | 2a4fc7de2daee45d55b6721f2ec87e5e4e23c35d (patch) | |
tree | 2bb800e80d2c4e7f6da1bd01403478cad88ee355 | |
parent | 9409166af7f7cbf449df08fee27a780392ebe7a2 (diff) |
New testcase
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101968 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr22422.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr22422.c b/gcc/testsuite/gcc.c-torture/compile/pr22422.c new file mode 100644 index 00000000000..bc176f9699a --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr22422.c @@ -0,0 +1,30 @@ +/* We should not crash trying to figure out the points-to sets for the below. We used to because we + ended up adding pointers to the points-to set of the ANYTHING variable. */ +struct D +{ + int n; + int c [8]; +}; + +struct A +{ + int i; + char *p; +}; + +struct B +{ + struct A *a; + struct D *d; +}; + +int dtInsert1 (struct B *b) +{ + struct A a = { 0, 0 }; + struct D *d; + b->a = &a; + d = b->d; + &d->c [d->n]; + return 0; +} + |