PR bootstrap/89980 - pointer initialization with empty string folded to zero
authorMartin Sebor <msebor@gcc.gnu.org>
Fri, 5 Apr 2019 19:49:38 +0000 (13:49 -0600)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 5 Apr 2019 19:49:38 +0000 (13:49 -0600)
commit6464d9b18207d381568b0a5b5a953286ccd2a5b6
tree63a0f8a21cc5a09ddf4e9f068ed290d4ad0f4a20
parent199b20e3cbf77757bb2e03649c98fc73b19c611e
PR bootstrap/89980 - pointer initialization with empty string folded to zero

gcc/cp/ChangeLog:

PR bootstrap/89980
* decl.c (reshape_init_array_1): Avoid treating empty strings
as zeros in array initializers.
Use trivial_type_p () instead of TYPE_HAS_TRIVIAL_DFLT().

gcc/testsuite/ChangeLog:

PR bootstrap/89980
* g++.dg/init/array52.C: New test.

From-SVN: r270177
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/array52.C [new file with mode: 0644]