[Bug c++/79180] Nested lambda-capture causes segfault for parameter pack

markus at dreseler dot de gcc-bugzilla@gcc.gnu.org
Sun Jan 22 08:31:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79180

--- Comment #1 from Markus Dreseler <markus at dreseler dot de> ---
P.S.: Also experienced on Wandbox's GCC 7.0.1 HEAD.

Not passing the parameter pack into bar by universal reference causes an
internal compiler error in gcc 7.0.1 HEAD:

        prog.cc: In function 'void bar(Args ...) [with Args =
{std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
>}]':
        prog.cc:14:4: internal compiler error: in make_decl_rtl, at
varasm.c:1304
           [&]() {
           ~~~~~~~
             [&]() {
             ~~~~~~~
                   foo(args...);
                   ~~~~~~~~~~~~~
               }();
               ~~~~
           }();
           ~^~



http://melpon.org/wandbox/permlink/mYtVweIn8zv4t74Y

Thanks to AMA at StackOverflow for finding this.


More information about the Gcc-bugs mailing list