+2010-05-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/43636
+ * builtins.c (expand_movstr): Use a temporary pseudo instead
+ of target even when target is not NULL and not const0_rtx, but
+ fails movstr predicate.
+ * config/m32c/blkmov.md (movstr): Add predicate to first operand.
+
2010-05-28 Joseph Myers <joseph@codesourcery.com>
* final.c (rest_of_clean_state): Use %m in errors instead of
dest_mem = get_memory_rtx (dest, NULL);
src_mem = get_memory_rtx (src, NULL);
+ data = insn_data + CODE_FOR_movstr;
if (!endp)
{
target = force_reg (Pmode, XEXP (dest_mem, 0));
}
else
{
- if (target == 0 || target == const0_rtx)
+ if (target == 0
+ || target == const0_rtx
+ || ! (*data->operand[0].predicate) (target, Pmode))
{
end = gen_reg_rtx (Pmode);
- if (target == 0)
+ if (target != const0_rtx)
target = end;
}
else
end = target;
}
- data = insn_data + CODE_FOR_movstr;
-
if (data->operand[0].mode != VOIDmode)
end = gen_lowpart (data->operand[0].mode, end);
;; Machine Descriptions for R8C/M16C/M32C
-;; Copyright (C) 2006, 2007
+;; Copyright (C) 2006, 2007, 2010
;; Free Software Foundation, Inc.
;; Contributed by Red Hat.
;;
;; 2 = source (mem:BLK ...)
(define_expand "movstr"
- [(match_operand 0 "" "")
+ [(match_operand 0 "m32c_nonimmediate_operand" "")
(match_operand 1 "ap_operand" "")
(match_operand 2 "ap_operand" "")
]
+2010-05-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/43636
+ * gcc.c-torture/compile/pr43636.c: New test.
+
2010-05-28 Iain Sandoe <iains@gcc.gnu.org>
- PR ObjC++/23616
+ PR objc++/23616
* obj-c++.dg/try-catch-2.mm: Adjust xfail.
* obj-c++.dg/try-catch-9.mm: Ditto.
2010-05-27 Iain Sandoe <iains@gcc.gnu.org>
- PR ObjC/44140
+ PR objc/44140
* objc.dg/torture/tls/thr-init-2.m: Skip for -flto, -fwhopr.
* objc.dg/torture/tls/thr-init-3.m: Ditto.
* objc.dg/torture/tls/thr-init.m: Ditto.
2010-05-25 Iain Sandoe <iains@gcc.gnu.org>
- PR ObjC/44140
+ PR objc/44140
* objc.dg/torture/tls/thr-init-3.m: XFAIL lto/whopr for all.
2010-05-25 Iain Sandoe <iains@gcc.gnu.org>
2010-05-24 Iain Sandoe <iains@gcc.gnu.org>
- PR ObjC++/43689
+ PR objc++/43689
* obj-c++.dg/const-str-5.mm: Name pointer equivalence union.
* obj-c++.dg/const-str-6.mm: Ditto.
--- /dev/null
+/* PR target/43636 */
+
+extern char a[], *b[];
+
+char *
+foo (char *x, int y)
+{
+ x = __builtin_stpcpy (x, b[a[y]]);
+ return x;
+}