[Bug c++/91644] [C++20] constinit segfaults inside templated functions

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 3 10:38:00 GMT 2019


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
DECL_TEMPLATE_INFO is NULL for such VAR_DECLs, so:
7183          /* Handle `constinit' on variable templates.  */
7184          if (flags & LOOKUP_CONSTINIT)
7185            TINFO_VAR_DECLARED_CONSTINIT (DECL_TEMPLATE_INFO (decl)) =
true;
segfaults.


More information about the Gcc-bugs mailing list