]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gcc.dg/vect/pr96854.c
tree-optimization/96854 - SLP reduction of two-operator is broken
[gcc.git] / gcc / testsuite / gcc.dg / vect / pr96854.c
1 /* { dg-additional-options "-ffast-math" } */
2
3 double _Complex __attribute__((noipa))
4 foo (double _Complex acc, const double _Complex *x, const double _Complex* y, int N)
5 {
6 for (int c = 0; c < N; ++c)
7 acc -= x[c] * y[c];
8 return acc;
9 }
10
11 int
12 main()
13 {
14 static const double _Complex y[] = { 1, 2, };
15 static const double _Complex x[] = { 1, 3, };
16 double _Complex ref = foo (0, x, y, 2);
17 if (__builtin_creal (ref) != -7.)
18 __builtin_abort ();
19 return 0;
20 }
This page took 0.035876 seconds and 5 git commands to generate.