From 35d7b5284eca6130b34694137e590ebc553fedb6 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Sun, 17 Feb 2019 17:25:27 +0000 Subject: [PATCH] re PR c++/89315 (Cannot convert to std::initializer_list - fails with gcc9 works with gcc8) PR c++/89315 * g++.dg/cpp0x/initlist114.C: New test. From-SVN: r268971 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/cpp0x/initlist114.C | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/initlist114.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9ee97dc38f7..e128474dc9e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -5,6 +5,9 @@ * g++.old-deja/g++.robertl/eb82.C: Tweak dg-error. + PR c++/89315 + * g++.dg/cpp0x/initlist114.C: New test. + 2019-02-16 David Malcolm PR c++/88680 diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist114.C b/gcc/testsuite/g++.dg/cpp0x/initlist114.C new file mode 100644 index 00000000000..ffd7fa973bd --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/initlist114.C @@ -0,0 +1,21 @@ +// PR c++/89315 +// { dg-do compile { target c++11 } } + +#include + +struct bar { + bar(std::initializer_list, int = int()); +}; + +struct i { + const bar & invitees; +}; + +template struct n { +public: + void m_fn1() { i{{}}; } +}; + +struct o : n<> { + void p() { m_fn1(); } +}; -- 2.30.2