aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-02-03 17:14:40 +0100
committerJakub Jelinek <jakub@redhat.com>2021-02-03 17:16:40 +0100
commitc926940f528e689100574a0c600e37548239adab (patch)
treec454142aa84fca44fc2ad9f06f7b9fa0af21f56a /gcc
parenta6f08be383f846a0474ea8d1da9222b802c36c7c (diff)
downloadgcc-c926940f528e689100574a0c600e37548239adab.zip
gcc-c926940f528e689100574a0c600e37548239adab.tar.gz
gcc-c926940f528e689100574a0c600e37548239adab.tar.bz2
testsuite: Add test for already fixed PR [PR97804]
This testcase got fixed with the PR98463 r11-6895-g94ff4c9dd98f39280fba22d1ad0958fb25a5363b fix. 2021-02-03 Jakub Jelinek <jakub@redhat.com> PR c++/97804 * g++.dg/cpp2a/no_unique_address11.C: New test.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/no_unique_address11.C18
1 files changed, 18 insertions, 0 deletions
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 0000000..9ca6184
--- /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 <typename a> struct b {
+ constexpr b() : c() {}
+ [[no_unique_address]] a c;
+};
+template <unsigned long, typename...> struct d;
+template <unsigned long e, typename a, typename... f>
+struct d<e, a, f...> : d<1, f...>, b<a> {};
+template <unsigned long e, typename a> struct d<e, a> : b<a> {};
+template <typename... g> class h : d<0, g...> {};
+struct i {};
+class j {
+ using k = int;
+ h<k, i> l;
+ float m = 0.025f;
+} n;