My test is the result of reducing a file with just "include <atomic>",
just like in the PR.

It was fixed in r269059 which added a similar test, except mine does
not use inheritance and is a bit simpler. So I figured it wouldn't
hurt to cover more scenarios for this ICE.

I ran the test in my build directory and received 4 passes and 1
unsupported test, which was expected.
Bootstrapped/regtested on x86_64-linux, ok for trunk?

2019-06-10  Matthew Beliveau  <mbeli...@redhat.com>
	PR c++/87250
	* g++.dg/cpp0x/pr87250.C: New test.

diff --git gcc/testsuite/g++.dg/cpp0x/pr87250.C gcc/testsuite/g++.dg/cpp0x/pr87250.C
new file mode 100644
index 00000000000..fe4bf1407de
--- /dev/null
+++ gcc/testsuite/g++.dg/cpp0x/pr87250.C
@@ -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) {}
+};

Reply via email to