aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-02-19 12:23:02 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-02-19 12:23:02 +0100
commit9215ddc3e28e28f79a4b667652e21efd548dfa1e (patch)
tree4218ac00794eb04dca0f7959ea35e13889b15a04 /gcc/testsuite
parent65ded15327a16a3bf62d5fb6b98ab783e805aeb7 (diff)
downloadgcc-9215ddc3e28e28f79a4b667652e21efd548dfa1e.zip
gcc-9215ddc3e28e28f79a4b667652e21efd548dfa1e.tar.gz
gcc-9215ddc3e28e28f79a4b667652e21efd548dfa1e.tar.bz2
re PR target/47800 (i?86 peephole related ICE)
PR target/47800 * config/i386/i386.md (peephole2 for shift and plus): Use operands[1] original mode in the first insn. * gcc.target/i386/pr47800.c: New test. From-SVN: r170311
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr47800.c15
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8dc3c71..be5a006 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/47800
+ * gcc.target/i386/pr47800.c: New test.
+
2011-02-18 Iain Sandoe <iains@gcc.gnu.org>
* objc/execute/exceptions/foward-1.x: New.
diff --git a/gcc/testsuite/gcc.target/i386/pr47800.c b/gcc/testsuite/gcc.target/i386/pr47800.c
new file mode 100644
index 0000000..45c817b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr47800.c
@@ -0,0 +1,15 @@
+/* PR target/47800 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=nocona" } */
+
+int
+foo (unsigned char *x, unsigned char *y)
+{
+ unsigned char a;
+ for (a = 0; x < y; x++)
+ if (a & 0x80)
+ a = (unsigned char) (a << 1) + 1 + *x;
+ else
+ a = (unsigned char) (a << 1) + *x;
+ return a;
+}