]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Implement mangling of RAW_DATA_CST [PR118278]
authorJakub Jelinek <jakub@redhat.com>
Wed, 15 Jan 2025 16:04:31 +0000 (17:04 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 15 Jan 2025 16:04:31 +0000 (17:04 +0100)
commit8d9d583484006a75bc3ed3b3badb585f3a0bb546
tree65b0a4f26dd91f3e35d0df28e49f3a91c15dfa04
parent1bc474f60fde7aba2e00d00f9fa491aff243ecba
c++: Implement mangling of RAW_DATA_CST [PR118278]

As the following testcases show (mangle80.C only after reversion of the
temporary reversion of C++ large array speedup commit), RAW_DATA_CST can
be seen during mangling of some templates and we ICE because
the mangler doesn't handle it.

The following patch handles it and mangles it the same as a sequence of
INTEGER_CSTs that were used previously instead.
The only slight complication is that if ce->value is the last nonzero
element, we need to skip the zeros at the end of RAW_DATA_CST.

2025-01-03  Jakub Jelinek  <jakub@redhat.com>

PR c++/118278
* mangle.cc (write_expression): Handle RAW_DATA_CST.

* g++.dg/abi/mangle80.C: New test.
* g++.dg/cpp/embed-19.C: New test.
gcc/cp/mangle.cc
gcc/testsuite/g++.dg/abi/mangle80.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp/embed-19.C [new file with mode: 0644]