Fixed by r268969 and it's a nice test (thanks Lars).

Tested on x86_64-linux, applying to trunk.

2019-02-17  Marek Polacek  <pola...@redhat.com>

        PR c++/89315
        * g++.dg/cpp0x/initlist114.C: New test.

diff --git gcc/testsuite/g++.dg/cpp0x/initlist114.C 
gcc/testsuite/g++.dg/cpp0x/initlist114.C
new file mode 100644
index 00000000000..ffd7fa973bd
--- /dev/null
+++ gcc/testsuite/g++.dg/cpp0x/initlist114.C
@@ -0,0 +1,21 @@
+// PR c++/89315
+// { dg-do compile { target c++11 } }
+
+#include <initializer_list>
+
+struct bar {
+    bar(std::initializer_list<int>, int = int());
+};
+
+struct i {
+    const bar & invitees;
+};
+
+template <typename = void> struct n {
+public:
+    void m_fn1() { i{{}}; }
+};
+
+struct o : n<> {
+    void p() { m_fn1(); }
+};

Reply via email to