Debian Codegraph @

gcc/testsuite/g++.dg/vect/pr105254.cc

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-fvect-cost-model=dynamic -mcpu=zeus" { target aarch64*-*-* } } */
3
4 template <typename>
5 struct complex;
6
7 template <>
8 struct complex<double> {
9 void operator+= (complex r) { v_ += r.v_; }
10 _Complex v_;
11 };
12
13 template <typename T>
14 void
15 bar (T);
16
17 void
18 foo (complex<double> *x)
19 {
20 complex<double> s = {0.0};
21
22 for (int i = 0; i < 16; ++i)
23 s += x[i];
24
25 bar<complex<double> > (s);
26 }