Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/decomp52.C

raw
1 // DR 2289
2 // PR c++/94553
3 // { dg-do compile { target c++17 } }
4 // A structured binding must be unique in its declarative region.
5
6 void
7 f ()
8 {
9 int arr[1] = { 1 };
10 struct A { };
11 auto [A] = arr; // { dg-error "redeclared as different kind of entity" }
12 auto [B] = arr;
13 struct B { }; // { dg-error "redeclared as different kind of entity" }
14 }