1/* PR tree-optimization/60823 */ 2/* { dg-do compile } */ 3/* { dg-options "-O2 -fopenmp-simd -fno-strict-aliasing" } */ 4 5void bar (char *, double *); 6 7#if __SIZEOF_DOUBLE__ >= 4 8 9struct S { char c[sizeof (double)]; }; 10void baz (struct S, struct S); 11union U { struct S s; double d; }; 12 13#pragma omp declare simd simdlen(4) notinbranch 14__attribute__((noinline)) int 15foo (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 32#endif 33