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]
Other format: [Raw text]

Re: [patch, tree-ssa] PR54295 Incorrect value extension in widening multiply-accumulate


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.

Attachment: wmult-warn.patch
Description: Text document


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