[Bug c++/86216] g++ ICE on valid code: verify_ssa failed

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 13 09:27:00 GMT 2018


--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I guess lambdas really need to have all the needed parameters captured, and for
VLAs that likely includes not just the VLAs themselves, but their sizes as
That is something that needs to be done in the FE somewhere, because lambdas
are handled only at that point.  Wonder if that means also creating another set
of the VLA types for the lambda with TYPE_SIZE{,_UNIT} that map to an
artificial field and that the capturing code initializes it with the
TYPE_SIZE{,_UNIT} (i.e. the SAVE_EXPR it has).  For normal nested functions (C
or Fortran) this is tree-nested.c's job and I think we handle it there already
right, because it is after gimplification and so the needed vars are exposed.

Or reject capturing VLAs (with a sorry) until that is done.

More information about the Gcc-bugs mailing list