aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2011-07-11 10:13:30 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2011-07-11 10:13:30 +0000
commit7e4ec472eeae2c37c4c16767eca148d568773bd0 (patch)
tree8cf4937b9ec598e6be79dd902b6226504cc37363 /gcc/testsuite
parent0e65e6311b89c91d88e7e785be06bb188fe91e8a (diff)
downloadgcc-7e4ec472eeae2c37c4c16767eca148d568773bd0.zip
gcc-7e4ec472eeae2c37c4c16767eca148d568773bd0.tar.gz
gcc-7e4ec472eeae2c37c4c16767eca148d568773bd0.tar.bz2
re PR target/39633 ([avr] loop bug: missing 8-bit comparison (*cmpqi))
gcc/ PR target/39633 * config/avr/avr.c (notice_update_cc): For ashiftrt:QI, only offsets 1..5 set cc0 in a usable way. testsuite/ PR target/39633 * gcc.target/avr/torture/pr39633.c: New test case. From-SVN: r176141
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/pr39633.c25
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3ae096e..e87be0d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-11 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/39633
+ * gcc.target/avr/torture/pr39633.c: New test case.
+
2011-07-11 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
diff --git a/gcc/testsuite/gcc.target/avr/torture/pr39633.c b/gcc/testsuite/gcc.target/avr/torture/pr39633.c
new file mode 100644
index 0000000..c5f5b04
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/pr39633.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+
+#include <stdlib.h>
+
+char c = 42;
+
+void __attribute__((noinline,noclone))
+pr39633 (char a)
+{
+ a >>= 7;
+ if (a)
+ c = a;
+}
+
+int main()
+{
+ pr39633 (6);
+
+ if (c != 42)
+ abort();
+
+ exit(0);
+
+ return 0;
+}