This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] jump.c: Remove unreachable code.


Hi,

Attached is a patch to remove unreachable code.

condjump_p ends with an "if" whose two arms are "return" statements,
so the last "return" is unreachable.

Bootstrapped on i686-pc-linux-gnu.  Comitted as obvious.

Kazu Hirata

2004-11-17  Kazu Hirata  <kazu@cs.umass.edu>

	* jump.c (condjump_p): Remove unreachable code.

Index: jump.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/jump.c,v
retrieving revision 1.251
diff -u -d -p -r1.251 jump.c
--- jump.c	4 Nov 2004 23:24:45 -0000	1.251
+++ jump.c	16 Nov 2004 04:51:34 -0000
@@ -766,8 +766,6 @@ condjump_p (rtx insn)
 		|| (GET_CODE (XEXP (x, 1)) == PC
 		    && (GET_CODE (XEXP (x, 2)) == LABEL_REF
 			|| GET_CODE (XEXP (x, 2)) == RETURN))));
-
-  return 0;
 }
 
 /* Return nonzero if INSN is a (possibly) conditional jump inside a


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]