PR c++/89974 - ICE on a definition of a non-type specialization on a struct object...
authorMartin Sebor <msebor@redhat.com>
Thu, 4 Apr 2019 23:10:23 +0000 (23:10 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Thu, 4 Apr 2019 23:10:23 +0000 (17:10 -0600)
commit187c6369c0b4c7e013fdbe9eb08d098166359056
tree7594a3b21feb39a649170bfa6daa218b1fdd8396
parent1a9b15a7d76ee3ee2cd960698a84e34ec10c2bf0
PR c++/89974 - ICE on a definition of a non-type specialization on a struct object with pointer to member function

PR c++/89974 - ICE on a definition of a non-type specialization on a struct object with pointer to member function
PR c++/89878 - same specializations on a zero-initialized struct object as a non-type parameter treated as distinct
PR c++/89833 - sorry, unimplemented: string literal in function template signature
PR c++/47488 - sorry, unimplemented: string literal in function template signature

gcc/cp/ChangeLog:

PR c++/89974
PR c++/89878
PR c++/89833
PR c++/47488
* decl.c (reshape_init_array_1): Strip trailing zero-initializers
from arrays of trivial type and known size.
* mangle.c (write_expression): Convert braced initializer lists
to STRING_CSTs.
(write_expression): Trim trailing zero-initializers from arrays
of trivial type.
(write_template_arg_literal): Mangle strings the same as braced
initializer lists.

gcc/testsuite/ChangeLog:

PR c++/89974
PR c++/89878
PR c++/89833
PR c++/47488
* gcc/testsuite/g++.dg/abi/mangle69.C: New test.
* gcc/testsuite/g++.dg/abi/mangle70.C: New test.
* gcc/testsuite/g++.dg/abi/mangle71.C: New test.
* gcc/testsuite/g++.dg/abi/mangle72.C: New test.
* gcc/testsuite/g++.dg/cpp0x/constexpr-array19.C: New test.
* gcc/testsuite/g++.dg/cpp2a/nontype-class15.C: New test.
* gcc/testsuite/g++.dg/cpp2a/nontype-class16.C: New test.
* gcc/testsuite/g++.dg/init/array51.C: New test.

From-SVN: r270155
13 files changed:
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/mangle.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/abi/mangle69.C [new file with mode: 0644]
gcc/testsuite/g++.dg/abi/mangle70.C [new file with mode: 0644]
gcc/testsuite/g++.dg/abi/mangle71.C [new file with mode: 0644]
gcc/testsuite/g++.dg/abi/mangle72.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/constexpr-array19.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/nontype-class15.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/nontype-class16.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/array51.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/nontype29.C [new file with mode: 0644]