From: Jason Merrill Date: Tue, 18 Aug 2015 21:29:07 +0000 (-0400) Subject: re PR c++/66919 (C++14 ICE during error reporting) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc40eb7580abd8cf45545908484348314ee43284;p=gcc.git re PR c++/66919 (C++14 ICE during error reporting) PR c++/66919 * g++.dg/cpp1y/auto-fn27.C: New. From-SVN: r226993 --- diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn27.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn27.C new file mode 100644 index 00000000000..c9291c2b8e4 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn27.C @@ -0,0 +1,42 @@ +// PR c++/66919 +// { dg-do compile { target c++14 } } + +template +struct A { + template + static auto run (F fn, R, T) { auto r = fn (); } // { dg-error "" } +}; +template +auto foo (F fn, T) +{ + A <0>::run (fn, 0, 0); +} +struct B; +struct C { + typedef B D; +}; +struct E { + virtual void bar (const int &); +}; +template +struct F : E { + typedef typename C::D::G G; + void bar (const G &); + typename C::D::H I; +}; +struct J { struct K {}; }; +template +void +F::bar (const G &) +{ + auto s = I; + typedef decltype (s) L; + auto u =[&](L) { auto t = foo (J::K (), 0); }; // { dg-error "" } +} +struct B { + typedef int G; + typedef int H; +}; +struct M : F { + M () {} +};