From 2e723874b5ed813da802a8dcb81134172d6408c6 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 12 Oct 2009 17:40:08 +0000 Subject: [PATCH] re PR target/26515 (peephole2 causes unrecognized insn, zero_extending non-general register) PR target/26515 * gcc.dg/torture/pr26515.c: New test. From-SVN: r152677 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/torture/pr26515.c | 27 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr26515.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6f07c4bfbf5..d6448ec1f9c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-10-12 Hans-Peter Nilsson + + PR target/26515 + * gcc.dg/torture/pr26515.c: New test. + 2009-10-12 Janis Johnson PR testsuite/41659 diff --git a/gcc/testsuite/gcc.dg/torture/pr26515.c b/gcc/testsuite/gcc.dg/torture/pr26515.c new file mode 100644 index 00000000000..a051e2e53c4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr26515.c @@ -0,0 +1,27 @@ +/* { dg-options "-march=v10" { target cris*-*-* } } */ +struct i +{ + long long i_size; + struct a *i_mapping; +}; +struct p +{ + struct a *mapping; + long index; +}; +extern void b (struct p*, unsigned); +extern void u (struct p*); +void +block_page_mkwrite (struct i *i, struct p *p) +{ + unsigned end = 0; + long long size = 0; + size = i->i_size; + if ((p->mapping != i->i_mapping)) + goto out_unlock; + if (((p->index + 1) << 13) > size) + end = size & ~(~(((1UL) << 13) - 1)); + b (p, end); +out_unlock: + u (p); +}