This is the mail archive of the gcc@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]

Re: tree-ssa bug?


On Thu, 03 Apr 2003, Eyal Lebedinsky wrote:

> Built off CVS branch tree-ssa-20020619-branch.
> Linux 2.4, i386
> 
> OK, here is another very strange result, took me a bit of time to track
> this one down.
>
Good catch.  This was an omission in the new non destructive
folders.  When folding comparisons with signed_max+1 we were
always replacing the comparison with >=.


Diego.

	* fold-const.c (fold_relational_hi_lo): Add missing comparison when
	folding comparisons to signed_max+1.


Index: fold-const.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v
retrieving revision 1.213.2.25
diff -d -u -p -r1.213.2.25 fold-const.c
--- fold-const.c	27 Feb 2003 18:30:02 -0000	1.213.2.25
+++ fold-const.c	3 Apr 2003 14:14:41 -0000
@@ -4983,7 +4983,7 @@ fold_relational_hi_lo (code_p, type_p, o
 	      st0 = (*lang_hooks.types.signed_type) (TREE_TYPE (op0));
 	      st1 = (*lang_hooks.types.signed_type) (TREE_TYPE (op1));
 
-	      exp = build (LE_EXPR ? GE_EXPR: LT_EXPR,
+	      exp = build (code == LE_EXPR ? GE_EXPR: LT_EXPR,
 			   type,
 			   convert (st0, op0),
 			   convert (st1, integer_zero_node));


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