On 20/08/12 15:01, Tobias Burnus wrote:
> Hi Richard,
> 
> your patch fails here; I get the build failure:
> 
> /projects/tob/gcc-git/gcc/gcc/tree-ssa-math-opts.c: In function ‘bool 
> is_widening_mult_rhs_p(tree, tree, tree_node**, tree_node**)’:
> /projects/tob/gcc-git/gcc/gcc/tree-ssa-math-opts.c:2014:18: error: 
> variable ‘rhs_code’ set but not used [-Werror=unused-but-set-variable]
>     enum tree_code rhs_code;
>                    ^
> 
> Tobias
> 
> On 08/17/2012 07:05 PM, Richard Earnshaw wrote:
>> --- tree-ssa-math-opts.c     (revision 190502)
>> +++ tree-ssa-math-opts.c     (local)
> 
>> @@ -1982,9 +2019,7 @@ is_widening_mult_rhs_p (tree type, tree
>>         if (is_gimple_assign (stmt))
>>      {
>>        rhs_code = gimple_assign_rhs_code (stmt);
>> -      if (TREE_CODE (type) == INTEGER_TYPE
>> -          ? !CONVERT_EXPR_CODE_P (rhs_code)
>> -          : rhs_code != FIXED_CONVERT_EXPR)
>> +      if (! widening_mult_conversion_strippable_p (type, stmt))
>>          rhs1 = rhs;
>>        else
>>          {
>>
> 
> 


Whoops!  Sorry about that.

Fixed thusly.  Committed as obvious.

        PR tree-ssa/54295
        * tree-ssa-math-opts.c (is_widening_mult_rhs_p): Delete rhs_code
        declaration and setter.

R.

Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c        (revision 190533)
+++ tree-ssa-math-opts.c        (working copy)
@@ -2011,14 +2011,12 @@ is_widening_mult_rhs_p (tree type, tree 
 {
   gimple stmt;
   tree type1, rhs1;
-  enum tree_code rhs_code;
 
   if (TREE_CODE (rhs) == SSA_NAME)
     {
       stmt = SSA_NAME_DEF_STMT (rhs);
       if (is_gimple_assign (stmt))
        {
-         rhs_code = gimple_assign_rhs_code (stmt);
          if (! widening_mult_conversion_strippable_p (type, stmt))
            rhs1 = rhs;
          else

Reply via email to