diff options
author | Jakub Jelinek <jakub@redhat.com> | 2025-01-20 18:00:43 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2025-01-20 18:00:43 +0100 |
commit | 0b58219fe112c01ff335edf699c4fc69e718c75b (patch) | |
tree | e35f578105679db7c150be92a233820267212ceb /gcc/fortran/trans-array.cc | |
parent | 9d869296f095a02c37d3721f546ce99663e5417c (diff) | |
download | gcc-0b58219fe112c01ff335edf699c4fc69e718c75b.zip gcc-0b58219fe112c01ff335edf699c4fc69e718c75b.tar.gz gcc-0b58219fe112c01ff335edf699c4fc69e718c75b.tar.bz2 |
c++: Handle RAW_DATA_CST in make_tree_vector_from_ctor [PR118528]
This is the first bug discovered today with the
https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673945.html
hack but then turned into proper testcases where embed-21.C FAILed
since introduction of optimized #embed support and the other when
optimizing large C++ initializers using RAW_DATA_CST.
The problem is that the C++ FE calls make_tree_vector_from_ctor
and uses that as arguments vector for deduction guide handling.
The call.cc code isn't prepared to handle RAW_DATA_CST just about
everywhere, so I think it is safer to make sure RAW_DATA_CST only
appears in CONSTRUCTOR_ELTS and nowhere else.
Thus, the following patch expands the RAW_DATA_CSTs from initializers
into multiple INTEGER_CSTs in the returned vector.
2025-01-20 Jakub Jelinek <jakub@redhat.com>
PR c++/118528
* c-common.cc (make_tree_vector_from_ctor): Expand RAW_DATA_CST
elements from the CONSTRUCTOR to individual INTEGER_CSTs.
* g++.dg/cpp/embed-21.C: New test.
* g++.dg/cpp2a/class-deduction-aggr16.C: New test.
Diffstat (limited to 'gcc/fortran/trans-array.cc')
0 files changed, 0 insertions, 0 deletions