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]

Re: New version of sequence point warnings


On Fri, 24 Nov 2000, Bernd Schmidt wrote:
> 
> 	* fold-const.c (fold_range_test): Don't crash when lhs or rhs is NULL.
> 
> Index: fold-const.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/fold-const.c,v
> retrieving revision 1.140
> diff -u -p -r1.140 fold-const.c
> --- fold-const.c	2000/11/24 11:49:45	1.140
> +++ fold-const.c	2000/11/24 16:26:56
> @@ -3780,6 +3780,7 @@ fold_range_test (exp)
>       short-circuited branch and the underlying object on both sides
>       is the same, make a non-short-circuit operation.  */
>    else if (BRANCH_COST >= 2
> +	   && lhs != 0 && rhs != 0
>  	   && (TREE_CODE (exp) == TRUTH_ANDIF_EXPR
>  	       || TREE_CODE (exp) == TRUTH_ORIF_EXPR)
>  	   && operand_equal_p (lhs, rhs, 0))

Bootstrapped on x86-linux and installed.  Franz, I hope things build again
for you now.


Bernd


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