This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] combine.c: Remove unnecessary AND when storing intozero_extract.
Hi Zack,
> INTVAL being signed, the warning is accurate. Please fix.
Oops. Sorry about this. Committed as obvious.
Kazu Hirata
2003-03-21 Kazu Hirata <kazu at cs dot umass dot edu>
* combine.c (make_field_assignment): Fix a warning.
Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.349
diff -u -r1.349 combine.c
--- combine.c 21 Mar 2003 18:03:02 -0000 1.349
+++ combine.c 21 Mar 2003 21:36:54 -0000
@@ -7930,7 +7930,7 @@
&& INTVAL (XEXP (assign, 1)) < HOST_BITS_PER_WIDE_INT
&& GET_CODE (src) == AND
&& GET_CODE (XEXP (src, 1)) == CONST_INT
- && (INTVAL (XEXP (src, 1))
+ && ((unsigned HOST_WIDE_INT) INTVAL (XEXP (src, 1))
== ((unsigned HOST_WIDE_INT) 1 << INTVAL (XEXP (assign, 1))) - 1))
src = XEXP (src, 0);