https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67391

--- Comment #17 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #16)
> Kaz, does this patch fix the issue in c#11 ?

Yep, it fixes that ICE.  Thanks!
My 36387 trial patch can cause a similar problem with PR64533 when sp
is taken as the scratch register.  I've modified your patch with

diff --git a/config/sh/sh.md b/config/sh/sh.md
index 3e6a244..8e08d0b 100644
--- a/config/sh/sh.md
+++ b/config/sh/sh.md
@@ -2197,7 +2197,7 @@
   [(set (match_operand:SI 0 "arith_reg_dest" "=r,&u,&u")
        (plus:SI (match_operand:SI 1 "arith_reg_operand" "%0,r,r")
                 (match_operand:SI 2 "arith_or_int_operand" "rI08,r,n")))
-   (clobber (match_scratch:SI 3 "=X,X,&r"))]
+   (clobber (match_scratch:SI 3 "=X,X,&u"))]
   "TARGET_SH1"
   "@
        add     %2,%0

Now the full tests on sh4-unknown-linux-gnu are running.  I'll report
the results when completed.

Reply via email to