On 8/30/22 18:54, Rainer Orth wrote:
> Hi Andrew,
> 
>> On 26/08/2022 12:04, Jakub Jelinek wrote:
>>>> gcc/ChangeLog:
>>>>
>>>>    * doc/tm.texi: Regenerate.
>>>>    * omp-simd-clone.cc (simd_clone_adjust_return_type): Allow zero
>>>>    vecsize.
>>>>    (simd_clone_adjust_argument_types): Likewise.
>>>>    * target.def (compute_vecsize_and_simdlen): Document the new
>>>>    vecsize_int and vecsize_float semantics.
>>> LGTM, except for a formatting nit.
>> diff --git a/gcc/omp-simd-clone.cc b/gcc/omp-simd-clone.cc
>> index 58bd68b129b..68ee4c2c3b0 100644
>> --- a/gcc/omp-simd-clone.cc
>> +++ b/gcc/omp-simd-clone.cc
>> @@ -504,7 +504,10 @@ simd_clone_adjust_return_type (struct cgraph_node *node)
>>      veclen = node->simdclone->vecsize_int;
>>    else
>>      veclen = node->simdclone->vecsize_float;
>> -  veclen = exact_div (veclen, GET_MODE_BITSIZE (SCALAR_TYPE_MODE (t)));
>> +  if (known_eq (veclen, 0))
>> +    veclen = node->simdclone->simdlen;
>> +  else
>> +    veclen = exact_div (veclen, GET_MODE_BITSIZE (SCALAR_TYPE_MODE (t)));
>>    if (multiple_p (veclen, node->simdclone->simdlen))
>>      veclen = node->simdclone->simdlen;
>>    if (POINTER_TYPE_P (t))
> 
> this broke bootstrap on (at least) i386-pc-solaris2.11 and
> sparc-sun-solaris2.11:
> 
> In file included from /vol/gcc/src/hg/master/local/gcc/coretypes.h:475,
>                  from /vol/gcc/src/hg/master/local/gcc/omp-simd-clone.cc:23:
> /vol/gcc/src/hg/master/local/gcc/poly-int.h: In instantiation of 'typename 
> if_nonpoly<Cb, bool>::type maybe_ne(const poly_int_pod<N, C>&, const Cb&) 
> [with unsigned int N = 1; Ca = long long unsigned int; Cb = int; typename 
> if_nonpoly<Cb, bool>::type = bool]':
> /vol/gcc/src/hg/master/local/gcc/omp-simd-clone.cc:507:7:   required from here
> /vol/gcc/src/hg/master/local/gcc/poly-int.h:1295:22: error: comparison of 
> integer expressions of different signedness: 'const long long unsigned int' 
> and 'const int' [-Werror=sign-compare]
>  1295 |   return a.coeffs[0] != b;
>       |          ~~~~~~~~~~~~^~~~

I noticed the very same warning on x86_64-linux-gnu as well.

Cheers,
Martin

> 
> Changing the three instances of 0 to 0U seems to fix this.
> 
>       Rainer
> 

Reply via email to