diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-13 19:14:33 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-13 19:14:33 +0000 |
commit | 0dd8cf9cc8350069e94a624959d1ad4487c46a8c (patch) | |
tree | 63472a8da3b4d5a6c33190c256b60a5710d30a18 /gcc/testsuite/gcc.dg/torture/pr59374-3.c | |
parent | fe644b69d013e77c7fc2db2a9863969d4f564561 (diff) | |
parent | 69888cc76b4873822f5e48b66f69e9d20d19fc50 (diff) | |
download | gcc-0dd8cf9cc8350069e94a624959d1ad4487c46a8c.tar.gz |
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@206584 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr59374-3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr59374-3.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr59374-3.c b/gcc/testsuite/gcc.dg/torture/pr59374-3.c new file mode 100644 index 00000000000..ab0014d8f13 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr59374-3.c @@ -0,0 +1,21 @@ +extern void abort (void); + +static struct X { void *a; void *b; } a, b; + +void __attribute__((noinline)) foo (void) +{ + void *tem = a.b; + a.b = (void *)0; + b.b = tem; + b.a = a.a; + a.a = tem; +} + +int main() +{ + a.b = &a; + foo (); + if (b.b != &a) + abort (); + return 0; +} |