PR c++/90947 - Simple lookup table of array of strings is miscompiled
authorMartin Sebor <msebor@redhat.com>
Thu, 1 Aug 2019 23:45:36 +0000 (23:45 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Thu, 1 Aug 2019 23:45:36 +0000 (17:45 -0600)
commitb74f15a88ee1a2b96784803f0e38c386796ee704
tree7c4a96774ea3cef422ba9596824ceb090bf0ff21
parentf3b4eae6c3ac560f28f2d1d209ae5e0e030f95fe
PR c++/90947 - Simple lookup table of array of strings is miscompiled

gcc/cp/ChangeLog:

PR c++/90947
* decl.c (reshape_init_array_1): Avoid truncating initializer
lists containing string literals.

gcc/testsuite/ChangeLog:

PR c++/90947
* c-c++-common/array-1.c: New test.
* g++.dg/abi/mangle73.C: New test.
* g++.dg/cpp2a/nontype-class23.C: New test.
* g++.dg/init/array53.C: New test.

gcc/ChangeLog:

PR c++/90947
* tree.c (type_initializer_zero_p): Define.
* tree.h (type_initializer_zero_p): New function.

From-SVN: r273989
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/array-1.c [new file with mode: 0644]
gcc/testsuite/g++.dg/abi/mangle73.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/nontype-class23.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/array53.C [new file with mode: 0644]
gcc/tree.c
gcc/tree.h