From 53214bd157129d3c2a6e0854479fc4a344523d03 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sat, 7 Oct 2017 16:10:02 +0000 Subject: [PATCH] re PR c++/80805 (ICE in sufficiently complex code with -g (dump_aggr_type)) 2017-10-07 Paolo Carlini PR c++/80805 * g++.dg/cpp0x/pr80805.C: New. From-SVN: r253510 --- gcc/testsuite/g++.dg/cpp0x/pr80805.C | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr80805.C diff --git a/gcc/testsuite/g++.dg/cpp0x/pr80805.C b/gcc/testsuite/g++.dg/cpp0x/pr80805.C new file mode 100644 index 00000000000..a13ee1139c7 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr80805.C @@ -0,0 +1,21 @@ +// { dg-do compile { target c++11 } } +// { dg-options "-g" } + +template struct R { using type = T; }; +template F r(typename R::type f) { return f; } +template void s(F) {} +template void t(F f) { s(r(f)); } +template struct S {}; +template struct P { constexpr static bool value = false; }; +template +void g() +{ + constexpr static bool H = P::value; + using X = S; + []() -> X + { + t([]{}); + return X{}; + }(); +} +int main() { g(); } -- 2.30.2