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

--- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Created attachment 40062
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40062&action=edit
reduced source code

I've reduced the original source to the attached.  This emits 4 function
symbols, 2 of which are instantiations of the forward function.
        .type   _Z3Foov, @function
        .type   _Z7forwardIZ3FoovEUlRT_E_EOS0_S1_, @function
        .type   _Z8indirectIRZ3FoovEUlRT_E_EvOS0_, @function
        .type   _Z7forwardIRZ3FoovEUlRT_E_EOS0_S1_, @function

the one directly called from Foo (_Z7forwardIZ3FoovEUlRT_E_EOS0_S1_) demangles
without crashing, but appears to be incorrect:
  Foo()::{lambda()#1}&& ()
It's lost the 'forward' name.  The other one
(_Z7forwardIRZ3FoovEUlRT_E_EOS0_S1_) causes infinite recursion.  Here's a
snippet:
  Foo()::{lambda(Foo()::{lambda(Foo()::{lambda(Foo()::{lambda(Foo

continuing ...

Reply via email to