(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
torture/
pr102139.c
       1  /* { dg-do run } */
       2  /* { dg-additional-options "-ftree-slp-vectorize" } */
       3  
       4  typedef double aligned_double __attribute__((aligned(2*sizeof(double))));
       5  
       6  void __attribute__((noipa))
       7  bar (int aligned, double *p)
       8  {
       9    if (aligned)
      10      {
      11        *(aligned_double *)p = 3.;
      12        p[1] = 4.;
      13      }
      14    else
      15      {
      16        p[2] = 0.;
      17        p[3] = 1.;
      18      }
      19  }
      20  
      21  void __attribute__((noipa))
      22  foo (int i)
      23  {
      24    if (i)
      25      __builtin_exit (0);
      26  }
      27  void __attribute__((noipa))
      28  baz (double *p)
      29  {
      30    p[0] = 0.;
      31    p[1] = 1.;
      32    foo (1);
      33    *(aligned_double *)p = 3.;
      34    p[1] = 4.;
      35  }
      36  
      37  double x[8] __attribute__((aligned(2*sizeof (double))));
      38  int main()
      39  {
      40    bar (0, &x[1]);
      41    baz (&x[1]);
      42    return 0;
      43  }