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

            Bug ID: 99527
           Summary: ICE when using nested lambdas
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: janekb04 at icloud dot com
  Target Milestone: ---

Created attachment 50355
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50355&action=edit
The code that causes the error, the preprocessed version of the code and the
compiler output

When the code in the attachment is compiled it causes an Internal Compiler
Error. The code is also available on godbolt: https://godbolt.org/z/vn35js .

The code doesn't emit any warning using -Wall -Wextra -Wpedantic.
-fno-strict-aliasing -fwrapv don't seem to have any effect.

All the information about the compiler version and environment is available on
godbolt. For clarity, here is the version and flags.
version: g++ (Compiler-Explorer-Build) 11.0.1 20210309 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
flags: -std=c++20

The code that causes the error, the preprocessed version of the code and the
compiler output are in the attachment.

Not sure if it is relevant, but I will say just in case that the code is based
on a technique I discussed here:
https://janbielak.com/index.php/2021/01/15/anonymous-types-in-c/ .

Reply via email to