This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
PATCH: Mainline failed to bootstrap
- From: "H. J. Lu" <hjl at lucon dot org>
- To: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Cc: ebotcazou at adacore dot com
- Date: Mon, 16 Jan 2006 12:00:34 -0800
- Subject: PATCH: Mainline failed to bootstrap
- References: <20060116195331.GA13176@lucon.org>
On Mon, Jan 16, 2006 at 11:53:31AM -0800, H. J. Lu wrote:
> Due to
>
> http://gcc.gnu.org/ml/gcc-patches/2006-01/msg00837.html
>
> I got
>
> cc1: warnings being treated as errors
> /export/gnu/src/gcc/gcc/gcc/fold-const.c: In function âfold_minmaxâ:
> /export/gnu/src/gcc/gcc/gcc/fold-const.c:7194: warning: âcompl_codeâ
> may be used uninitialized in this function make[5]: *** [fold-const.o]
> Error 1
> make[5]: *** Waiting for unfinished jobs....
>
>
This patch works for me.
H.J.
----
2006-01-16 H.J. Lu <hongjiu.lu@intel.com>
* fold-const.c (fold_minmax): Always initialize compl_code.
--- gcc/fold-const.c.foo 2006-01-16 11:33:31.000000000 -0800
+++ gcc/fold-const.c 2006-01-16 11:56:13.000000000 -0800
@@ -7191,14 +7191,12 @@ fold_unary (enum tree_code code, tree ty
static tree
fold_minmax (enum tree_code code, tree type, tree op0, tree op1)
{
- enum tree_code compl_code;
+ enum tree_code compl_code = MIN_EXPR;
if (code == MIN_EXPR)
compl_code = MAX_EXPR;
- else if (code == MAX_EXPR)
- compl_code = MIN_EXPR;
else
- gcc_assert (FALSE);
+ gcc_assert (code == MAX_EXPR);
/* MIN (MAX (a, b), b) == b. Â*/
if (TREE_CODE (op0) == compl_code