public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-801] testsuite: Add testcase for already fixed PR [PR95226]
@ 2021-05-14 14:30 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2021-05-14 14:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4206171605de65df9674a14dd9db75bf4f4ed037

commit r12-801-g4206171605de65df9674a14dd9db75bf4f4ed037
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri May 14 16:29:49 2021 +0200

    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.

Diff:
---
 gcc/testsuite/g++.dg/cpp1y/pr95226.C | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gcc/testsuite/g++.dg/cpp1y/pr95226.C b/gcc/testsuite/g++.dg/cpp1y/pr95226.C
new file mode 100644
index 00000000000..614c83c8cda
--- /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 ();
+}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-14 14:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 14:30 [gcc r12-801] testsuite: Add testcase for already fixed PR [PR95226] Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).