------- Comment #4 from rguenther at suse dot de 2007-10-30 13:24 ------- Subject: Re: [4.3 Regression] Type verification failure with new expression
On Tue, 30 Oct 2007, jakub at gcc dot gnu dot org wrote: > ------- Comment #3 from jakub at gcc dot gnu dot org 2007-10-30 13:12 ------- > Testing a fix: > --- gcc/fold-const.c.jj 2007-10-19 14:39:55.000000000 +0200 > +++ gcc/fold-const.c 2007-10-30 14:09:39.000000000 +0100 > @@ -9504,12 +9504,15 @@ fold_binary (enum tree_code code, tree t > if (TREE_CODE (arg0) == COMPOUND_EXPR) > return build2 (COMPOUND_EXPR, type, TREE_OPERAND (arg0, 0), > fold_build2 (code, type, > - TREE_OPERAND (arg0, 1), op1)); > + fold_convert (TREE_TYPE (op0), > + TREE_OPERAND (arg0, 1)), > + op1)); > if (TREE_CODE (arg1) == COMPOUND_EXPR > && reorder_operands_p (arg0, TREE_OPERAND (arg1, 0))) > return build2 (COMPOUND_EXPR, type, TREE_OPERAND (arg1, 0), > - fold_build2 (code, type, > - op0, TREE_OPERAND (arg1, 1))); > + fold_build2 (code, type, op0, > + fold_convert (TREE_TYPE (op1), > + TREE_OPERAND (arg1, 1)))); > > if (TREE_CODE (arg0) == COND_EXPR || COMPARISON_CLASS_P (arg0)) > { Pre-approved if it works (it looks obvious). Thanks. Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33709