annotate gcc/testsuite/g++.dg/cpp2a/paren-init23.C @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 // PR c++/93790 - wrong paren-init of aggregates interference.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2 // { dg-do compile { target c++20 } }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4 struct S {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 int i;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 const S& s(1);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 struct A {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 int i;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 A(int);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 const A& a(1);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15 struct B {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 int i;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17 B(int) = delete;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19 const B& b(1); // { dg-error "use of deleted function" }