(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
pr92324-4.c
       1  #include "tree-vect.h"
       2  
       3  unsigned a[1024];
       4  int gres1, gres2;
       5  
       6  int __attribute__((noipa))
       7  foo (int n)
       8  {
       9    int res1 = 0;
      10    int res2 = 0;
      11    for (int i = 0; i < n; ++i)
      12      {
      13        res1 = res1 > a[2*i] ? res1 : a[2*i];
      14        res2 = res2 > a[2*i+1] ? res2 : a[2*i+1];
      15      }
      16    gres1 = res1;
      17    gres2 = res2;
      18  }
      19  
      20  int main ()
      21  {
      22    check_vect ();
      23    a[30] = (unsigned)__INT_MAX__ + 1;
      24    a[31] = (unsigned)__INT_MAX__ + 1;
      25    foo (16);
      26    if (gres1 != -__INT_MAX__ - 1
      27        || gres2 != -__INT_MAX__ - 1)
      28      __builtin_abort ();
      29    return 0;
      30  }
      31  
      32  /* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 0 "vect" } } */