This is a pretty obvious typo/thinko. Interestingly enough, fixing it makes absolutely no difference in the generated code for newlib ;-) One could make an argument it should just be zapped, but I'm not going to open that can of worms today.

Obviously I tested this by building newlib before and after this change :-)


        * PR target/50356
        * config/h8300/h8300.c (h8300_rtx_costs): Fix typo in CONST_INT case.

Index: config/h8300/h8300.c
===================================================================
--- config/h8300/h8300.c        (revision 192102)
+++ config/h8300/h8300.c        (working copy)
@@ -1,6 +1,6 @@
 /* Subroutines for insn-output.c for Renesas H8/300.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    Free Software Foundation, Inc.
    Contributed by Steve Chamberlain (s...@cygnus.com),
    Jim Wilson (wil...@cygnus.com), and Doug Evans (d...@cygnus.com).
@@ -1244,7 +1244,7 @@
            *total = 0;
            return true;
          }
-       if (-4 <= n || n <= 4)
+       if (-4 <= n && n <= 4)
          {
            switch ((int) n)
              {

Reply via email to