[Bug c++/104302] [12 Regression] ICE Segmentation fault since r12-6825-g2da90ad39bf8fa9e
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 3 04:21:08 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104302
--- Comment #2 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:501c4ee9fad68716497db4d96b63b801cc57b4a1
commit r12-7010-g501c4ee9fad68716497db4d96b63b801cc57b4a1
Author: Jason Merrill <jason@redhat.com>
Date: Wed Feb 2 17:49:02 2022 -0500
c++: dependent array bounds completion [PR104302]
The patch for PR55227 changed the minimal init-list handling in
cp_complete_array_type to a call to reshape_init, which broke on the
dependent initializer. It occurred to me that trying to deduce the array
size from a dependent init-list is wrong in general, so let's just not. I
also limited the reshape_init call to the case of a char array, as before
the patch for 55227; that's the only case where we want to strip a level of
braces from an array.
PR c++/104302
gcc/cp/ChangeLog:
* decl.cc (maybe_deduce_size_from_array_init): Give up
on type-dependent init.
(cp_complete_array_type): Only call reshape_init for character
array.
gcc/testsuite/ChangeLog:
* g++.dg/template/array35.C: New test.
* g++.dg/template/array36.C: New test.
More information about the Gcc-bugs
mailing list