(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
gomp/
pr60823-3.c
       1  /* PR tree-optimization/60823 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O2 -fopenmp-simd -fno-strict-aliasing" } */
       4  
       5  void bar (char *, double *);
       6  
       7  #if __SIZEOF_DOUBLE__ >= 4
       8  
       9  struct S { char c[sizeof (double)]; };
      10  void baz (struct S, struct S);
      11  union U { struct S s; double d; };
      12  
      13  #pragma omp declare simd simdlen(4) notinbranch
      14  __attribute__((noinline)) int
      15  foo (double c1, double c2)
      16  {
      17    double *a = &c1;
      18    char *b = (char *) &c1 + 2;
      19  
      20    b[-2]++;
      21    b[1]--;
      22    *a++;
      23    c2++;
      24    bar ((char *) &c2 + 1, &c2);
      25    c2 *= 3.0;
      26    bar (b, a);
      27    baz (((union U) { .d = c1 }).s, ((union U) { .d = c2 }).s);
      28    baz (*(struct S *)&c1, *(struct S *)&c2);
      29    return c1 + c2 + ((struct S *)&c1)->c[1];
      30  }
      31  /* { dg-warning "GCC does not currently support mixed size types for 'simd' functions" "" { target aarch64*-*-* } .-16 } */
      32  
      33  #endif