aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/decomp65.C
blob: 5dd8effcdff2673f33533b2b47894fde7a056cfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// PR c++/121442
// { dg-do compile { target c++11 } }
// { dg-options "" }

struct S { int a, b, c, d, e; };

void
foo ()
{
  auto [a, b, b, b, c ] = S {};		// { dg-warning "structured bindings only available with" "" { target c++14_down } }
					// { dg-error "redeclaration of 'auto b'" "" { target *-*-* } .-1 }
					// { dg-message "'auto b' previously declared here" "" { target *-*-* } .-2 }
}