On Wed, Jan 10, 2024 at 06:07:16PM +0000, Tamar Christina wrote:
> --- a/gcc/testsuite/gcc.dg/vect/vect-early-break_100-pr113287.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_100-pr113287.c

When the testcase was being adjusted for unsigned long -> unsigned long long,
two spots using long weren't changed to long long, so the testcase still warns
about UB in shifts.

Excess errors:
.../gcc/gcc/testsuite/gcc.dg/vect/vect-early-break_100-pr113287.c:28:48: 
warning: right shift count >= width of type [-Wshift-count-overflow]

Fixed thusly, committed to trunk as obvious.

2024-01-13  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/113287
        * gcc.dg/vect/vect-early-break_100-pr113287.c: Use long long instead
        of long.

--- gcc/testsuite/gcc.dg/vect/vect-early-break_100-pr113287.c.jj        
2024-01-12 17:02:46.176055981 +0100
+++ gcc/testsuite/gcc.dg/vect/vect-early-break_100-pr113287.c   2024-01-13 
10:30:25.452872016 +0100
@@ -18,14 +18,14 @@ foo (void)
 {
   unsigned long long r[142];
   bar (r);
-  unsigned long long v = ((long) r[0] >> 31);
+  unsigned long long v = ((long long) r[0] >> 31);
   if (v + 1 > 1)
     return 1;
   for (unsigned long long i = 1; i <= 140; ++i)
     if (r[i] != v)
       return 1;
   unsigned long long w = r[141];
-  if ((unsigned long long) (((long) (w << 60)) >> 60) != v)
+  if ((unsigned long long) (((long long) (w << 60)) >> 60) != v)
     return 1;
   return 0;
 }



        Jakub

Reply via email to