1 // { dg-do run { target c++11 } }
2 // { dg-options "" }
3
4 typedef int V __attribute__((vector_size (4 * sizeof (int))));
5 V a = (V) { 1, 2, 3, 4 };
6 __complex__ double b = 5.0 + 6.0i;
7 __complex__ int c = 7 + 8i;
8
9 int
main()10 main ()
11 {
12 auto & [ d, e, f, g ] = a; // { dg-warning "structured bindings only available with" "" { target c++14_down } }
13 auto [ h, i, j, k ] = a; // { dg-warning "structured bindings only available with" "" { target c++14_down } }
14 auto [ l, m ] = b; // { dg-warning "structured bindings only available with" "" { target c++14_down } }
15 auto & [ n, o ] = b; // { dg-warning "structured bindings only available with" "" { target c++14_down } }
16 auto & [ p, q ] = c; // { dg-warning "structured bindings only available with" "" { target c++14_down } }
17 auto [ r, s ] = c; // { dg-warning "structured bindings only available with" "" { target c++14_down } }
18 d += 10;
19 e += 11;
20 f += 12;
21 g += 13;
22 h += 14;
23 i += 15;
24 j += 16;
25 k += 17;
26 l = l * 2.;
27 m = m * 3.;
28 n = n * 3.;
29 o = o * 2.;
30 p += 18;
31 q += 19;
32 r += 22;
33 s += 23;
34 if (d != 11 || &d != &a[0]
35 || e != 13 || &e != &a[1]
36 || f != 15 || &f != &a[2]
37 || g != 17 || &g != &a[3]
38 || h != 15 || &h == &a[0]
39 || i != 17 || &i == &a[1]
40 || j != 19 || &j == &a[2]
41 || k != 21 || &k == &a[3]
42 || l != 10.0 || &l == &__real__ b
43 || m != 18.0 || &m == &__imag__ b
44 || n != 15.0 || &n != &__real__ b
45 || o != 12.0 || &o != &__imag__ b
46 || p != 25 || &p != &__real__ c
47 || q != 27 || &q != &__imag__ c
48 || r != 29 || &r == &__real__ c
49 || s != 31 || &s == &__imag__ c
50 || a[0] != 11 || a[1] != 13 || a[2] != 15 || a[3] != 17
51 || b != 15.0 + 12.0i
52 || c != 25 + 27i)
53 __builtin_abort ();
54 }
55