From c926940f528e689100574a0c600e37548239adab Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 3 Feb 2021 17:14:40 +0100 Subject: [PATCH] testsuite: Add test for already fixed PR [PR97804] This testcase got fixed with the PR98463 r11-6895-g94ff4c9dd98f39280fba22d1ad0958fb25a5363b fix. 2021-02-03 Jakub Jelinek PR c++/97804 * g++.dg/cpp2a/no_unique_address11.C: New test. --- .../g++.dg/cpp2a/no_unique_address11.C | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp2a/no_unique_address11.C diff --git a/gcc/testsuite/g++.dg/cpp2a/no_unique_address11.C b/gcc/testsuite/g++.dg/cpp2a/no_unique_address11.C new file mode 100644 index 00000000000..9ca618442aa --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/no_unique_address11.C @@ -0,0 +1,18 @@ +// PR c++/97804 +// { dg-do compile { target c++17 } } + +template struct b { + constexpr b() : c() {} + [[no_unique_address]] a c; +}; +template struct d; +template +struct d : d<1, f...>, b {}; +template struct d : b {}; +template class h : d<0, g...> {}; +struct i {}; +class j { + using k = int; + h l; + float m = 0.025f; +} n; -- 2.30.2