From patchwork Thu Oct 4 20:58:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [BZ,50356] Obvious bugfix in h8300 bits Date: Thu, 04 Oct 2012 10:58:26 -0000 From: Jeff Law X-Patchwork-Id: 189323 Message-Id: <506DF872.8010101@redhat.com> To: gcc-patches 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 (sac@cygnus.com), Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). @@ -1244,7 +1244,7 @@ *total = 0; return true; } - if (-4 <= n || n <= 4) + if (-4 <= n && n <= 4) { switch ((int) n) {