comparison gcc/testsuite/g++.dg/cpp1z/decomp52.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
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 }