Patchwork Fix typo in definition of macro AUTO_INC_DEC in rtl.h

login
register
mail settings
Submitter Bin Cheng
Date April 3, 2013, 1:39 a.m.
Message ID <004401ce300c$1e6d1850$5b4748f0$@cheng@arm.com>
Download mbox | patch
Permalink /patch/233200/
State New
Headers show

Comments

Bin Cheng - April 3, 2013, 1:39 a.m.
> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-owner@gcc.gnu.org]
On
> Behalf Of Bin Cheng
> Sent: Wednesday, April 03, 2013 9:38 AM
> To: gcc-patches@gcc.gnu.org
> Subject: [PATCH GCC]Fix typo in definition of macro AUTO_INC_DEC in rtl.h
> 
> Hi,
> When I look into code of auto-inc-dec.c in GCC, I found this typo in
rtl.h, as
> #if (defined (HAVE_PRE_INCREMENT) || defined (HAVE_PRE_DECREMENT) \
>      || defined (HAVE_POST_INCREMENT) || defined (HAVE_POST_DECREMENT) \
>      || defined (HAVE_PRE_MODIFY_DISP) || defined (HAVE_PRE_MODIFY_DISP) \
>      || defined (HAVE_PRE_MODIFY_REG) || defined (HAVE_POST_MODIFY_REG))
> #define AUTO_INC_DEC #endif
> 
> The 2nd HAVE_PRE_MODIFY_DISP should be HAVE_POST_MODIFY_DISP.
> 
> Tested on Thumb2(cortex-m3), no failure introduced. Since the pass is
disabled
> on x86/x86_64, so I did not run regression test on it.
> 
> Thanks.
> 
> 2013-04-03  Bin Cheng  <bin.cheng@arm.com>
> 
> 	* rtl.h (AUTO_INC_DEC): Fix typo of HAVE_POST_MODIFY_DISP.
> 
Patch attached.

Patch

Index: gcc/rtl.h
===================================================================
--- gcc/rtl.h	(revision 197231)
+++ gcc/rtl.h	(working copy)
@@ -1658,7 +1658,7 @@  do {									\
 
 #if (defined (HAVE_PRE_INCREMENT) || defined (HAVE_PRE_DECREMENT) \
      || defined (HAVE_POST_INCREMENT) || defined (HAVE_POST_DECREMENT) \
-     || defined (HAVE_PRE_MODIFY_DISP) || defined (HAVE_PRE_MODIFY_DISP) \
+     || defined (HAVE_PRE_MODIFY_DISP) || defined (HAVE_POST_MODIFY_DISP) \
      || defined (HAVE_PRE_MODIFY_REG) || defined (HAVE_POST_MODIFY_REG))
 #define AUTO_INC_DEC
 #endif