[Bug c++/95232] [11 Regression] ICE in make_ssa_name_fn, at tree-ssanames.c:279 since r11-283-gf315d1477d5164cb

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 3 18:07:15 GMT 2020


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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:ef4e0c35546ba2c897613925c1d2485603ca3ab1

commit r11-880-gef4e0c35546ba2c897613925c1d2485603ca3ab1
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Jun 2 16:23:02 2020 -0400

    c++: Fix VLA in template [PR95232]

    In a non-template, grokdeclarator notices when we build a pointer to a
    variably-modified type, and inserts a TYPE_DECL to make sure that type gets
    gimplified.  But in a template we can't always recognize a
variably-modified
    type, so we need to deal with it at instantiation time.

    gcc/cp/ChangeLog:

            PR c++/95232
            * cp-tree.h (predeclare_vla): Declare.
            * cp-gimplify.c (predeclare_vla): Handle getting a decl.
            * pt.c (tsubst_expr) [DECL_EXPR]: Use it.

    gcc/testsuite/ChangeLog:

            PR c++/95232
            * g++.dg/ubsan/vla-2.C: New test.


More information about the Gcc-bugs mailing list