aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2020-02-19 15:59:33 -0500
committerMarek Polacek <polacek@redhat.com>2020-02-26 10:33:18 -0500
commit38e1002657828150b2cda9f80c1f752184286e80 (patch)
tree848964a3def8a1c117965c14e08b2b68c378cbb8 /gcc/cp/class.c
parent8ce13842b50cbd2676f2e322995182af20df31fe (diff)
downloadgcc-38e1002657828150b2cda9f80c1f752184286e80.zip
gcc-38e1002657828150b2cda9f80c1f752184286e80.tar.gz
gcc-38e1002657828150b2cda9f80c1f752184286e80.tar.bz2
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.
Diffstat (limited to 'gcc/cp/class.c')
0 files changed, 0 insertions, 0 deletions