[C++ PATCH] PR c++/86969 - ICE with constexpr if and recursive generic lambdas.

Jason Merrill jason@redhat.com
Fri Mar 1 00:04:00 GMT 2019


On Wed, Feb 27, 2019 at 4:54 PM Jason Merrill <jason@redhat.com> wrote:
>
> Immediately capturing a VLA means we need to create a dependent VLA capture
> type, and not in the context of the lambda op(), since trying to look up the
> instantiation of the op() while we're substituting into the capture list
> would crash.  So I force TYPE_CONTEXT and the binding level out to the
> enclosing function before pushtag, avoid adding a TAG_DEFN, and instead
> force the type to be complete in tsubst_lambda_expr.

...or we could delay doing the special VLA handling until its type
becomes non-dependent, which is a lot simpler and less kludgey.

Tested x86_64-pc-linux-gnu, applying to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 86969-2.patch
Type: text/x-patch
Size: 3615 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190301/6af816a2/attachment.bin>


More information about the Gcc-patches mailing list