PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / pr65533.c
blob49edf15c00e9587d35e3f54c1c2b1292af4ba2c8
1 /* PR tree-optimization/65533 */
2 /* { dg-do compile } */
3 /* { dg-options "-Ofast -w" } */
5 struct A { int a[2]; };
6 struct B { double b[2]; };
7 struct C { double c[4][1]; };
9 static inline void
10 bar (struct B *x, double y, double z)
12 x->b[0] = y;
13 x->b[1] = z;
16 void baz (struct B *);
18 void
19 foo (struct C *x, struct A *y)
21 struct B d;
22 bar (&d, x->c[1][0] * y->a[0] + x->c[0][1] * y->a[1] + x->c[0][0] * x->c[0][1],
23 x->c[0][0] * y->a[0] + x->c[0][1] * y->a[1] + x->c[0][1] * y->a[0] + x->c[0][0]);
24 baz (&d);