re PR target/43636 (ICE in extract_insn, at recog.c:2103)
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. * gcc.c-torture/compile/pr43636.c: New test. From-SVN: r159972
This commit is contained in:
parent
773c1c8d20
commit
005d613b2d
|
@ -1,3 +1,11 @@
|
|||
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
|
||||
|
|
|
@ -3560,6 +3560,7 @@ expand_movstr (tree dest, tree src, rtx target, int endp)
|
|||
|
||||
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));
|
||||
|
@ -3568,18 +3569,18 @@ expand_movstr (tree dest, tree src, rtx target, int endp)
|
|||
}
|
||||
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);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;; Machine Descriptions for R8C/M16C/M32C
|
||||
;; Copyright (C) 2006, 2007
|
||||
;; Copyright (C) 2006, 2007, 2010
|
||||
;; Free Software Foundation, Inc.
|
||||
;; Contributed by Red Hat.
|
||||
;;
|
||||
|
@ -214,7 +214,7 @@
|
|||
;; 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" "")
|
||||
]
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
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.
|
||||
|
||||
|
@ -21,7 +26,7 @@
|
|||
|
||||
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.
|
||||
|
@ -152,7 +157,7 @@
|
|||
|
||||
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>
|
||||
|
@ -182,7 +187,7 @@
|
|||
|
||||
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.
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
/* PR target/43636 */
|
||||
|
||||
extern char a[], *b[];
|
||||
|
||||
char *
|
||||
foo (char *x, int y)
|
||||
{
|
||||
x = __builtin_stpcpy (x, b[a[y]]);
|
||||
return x;
|
||||
}
|
Loading…
Reference in New Issue