aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-05-14 16:29:49 +0200
committerJakub Jelinek <jakub@redhat.com>2021-05-14 16:29:49 +0200
commit4206171605de65df9674a14dd9db75bf4f4ed037 (patch)
tree2576e1d06a27814c7d6a95835f1642947852bed0 /gcc
parent3cafe627d6c8bce7e7f46bdbdef3d14e9701ce9d (diff)
downloadgcc-4206171605de65df9674a14dd9db75bf4f4ed037.zip
gcc-4206171605de65df9674a14dd9db75bf4f4ed037.tar.gz
gcc-4206171605de65df9674a14dd9db75bf4f4ed037.tar.bz2
testsuite: Add testcase for already fixed PR [PR95226]
2021-05-14 Jakub Jelinek <jakub@redhat.com> PR c++/95226 * g++.dg/cpp1y/pr95226.C: New test.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr95226.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr95226.C b/gcc/testsuite/g++.dg/cpp1y/pr95226.C
new file mode 100644
index 0000000..614c83c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr95226.C
@@ -0,0 +1,17 @@
+// PR c++/95226
+// { dg-do run { target c++14 } }
+
+#include <vector>
+
+struct T {
+ unsigned a;
+ float b {8.};
+};
+
+int main()
+{
+ T t = {1};
+ std::vector<T> tt = {{1}, {2}};
+ if (t.a != 1 || t.b != 8.0f || tt[0].a != 1 || tt[0].b != 8.0f || tt[1].a != 2 || tt[1].b != 8.0f)
+ __builtin_abort ();
+}