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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>:

https://gcc.gnu.org/g:38e1002657828150b2cda9f80c1f752184286e80

commit r10-6872-g38e1002657828150b2cda9f80c1f752184286e80
Author: Marek Polacek <pola...@redhat.com>
Date:   Wed Feb 19 15:59:33 2020 -0500

    c++: Fix value-init crash in template [PR93676]

    Since <https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00556.html> we
    attempt to value-initialize in build_vec_init even when there's no
    initializer but the type has a constexpr default constructor.  But
    build_value_init doesn't work in templates, and build_vec_init
    creates a lot of garbage that would not be used anyway, so don't
    call it in a template.

        PR c++/93676 - value-init crash in template.
        * init.c (build_new_1): Don't call build_vec_init in a template.

        * g++.dg/cpp0x/nsdmi-template19.C: New test.

Reply via email to