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
+2011-07-11 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/39633
+ * config/avr/avr.c (notice_update_cc): For ashiftrt:QI, only
+ offsets 1..5 set cc0 in a usable way.
+
2011-07-11 Romain Geissler <romain.geissler@gmail.com>
* tree.h (call_expr_arg): Remove.
{
rtx x = XEXP (src, 1);
- if (GET_CODE (x) == CONST_INT
- && INTVAL (x) > 0
- && INTVAL (x) != 6)
+ if (CONST_INT_P (x)
+ && IN_RANGE (INTVAL (x), 1, 5))
{
cc_status.value1 = SET_DEST (set);
cc_status.flags |= CC_OVERFLOW_UNUSABLE;
+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
--- /dev/null
+/* { 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;
+}