(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
pr105219.c
       1  /* { dg-do run } */
       2  /* { dg-additional-options "-O3" } */
       3  /* { dg-additional-options "-mtune=intel" { target x86_64-*-* i?86-*-* } } */
       4  /* { dg-additional-options "-mtune=thunderx" { target aarch64*-*-* } } */
       5  
       6  #include "tree-vect.h"
       7  
       8  int data[128];
       9  
      10  void __attribute((noipa))
      11  foo (int *data, int n)
      12  {
      13    for (int i = 0; i < n; ++i)
      14      data[i] = i;
      15  }
      16  
      17  int main()
      18  {
      19    check_vect ();
      20    for (int start = 0; start < 16; ++start)
      21      for (int n = 1; n < 3*16; ++n)
      22        {
      23          __builtin_memset (data, 0, sizeof (data));
      24          foo (&data[start], n);
      25          for (int j = 0; j < n; ++j)
      26            if (data[start + j] != j)
      27              __builtin_abort ();
      28        }
      29    return 0;
      30  }