re PR c++/87250 (Internal compiler error with -Os -fsyntax-only)
authorMatthew Beliveau <mbelivea@redhat.com>
Mon, 10 Jun 2019 20:35:00 +0000 (20:35 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 10 Jun 2019 20:35:00 +0000 (20:35 +0000)
PR c++/87250
* g++.dg/cpp0x/pr87250.C: New test.

From-SVN: r272129

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr87250.C [new file with mode: 0644]

index 6a1967f8211ac6ae29a9fd4eed1b5f233d432068..a40e0141a4924fce184a1b71e856aa7c024182de 100644 (file)
@@ -1,3 +1,8 @@
+2019-06-10  Matthew Beliveau  <mbelivea@redhat.com>
+
+       PR c++/87250
+       * g++.dg/cpp0x/pr87250.C: New test.
+
 2019-06-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR testsuite/90772
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr87250.C b/gcc/testsuite/g++.dg/cpp0x/pr87250.C
new file mode 100644 (file)
index 0000000..fe4bf14
--- /dev/null
@@ -0,0 +1,12 @@
+// PR c++/87250
+// { dg-do compile { target c++11 } }
+// { dg-options "-Os -fsyntax-only" }
+
+template <typename> struct a {
+  constexpr a(int) {}
+};
+template <typename> struct atomic;
+template <> struct atomic<bool> {
+  a<bool> b;
+  constexpr atomic(bool c) : b(c) {}
+};