aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/lib
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-04-03 13:21:56 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2025-04-03 13:21:56 +0200
commit70bf0ee44017e8e26bb1bdcb6a3fd114c25c39c7 (patch)
tree1ae9024ac356dd4c05dae8550125f137f2971b03 /libjava/classpath/lib
parent564e4e0819022925dd160e455ee44baf0fda5805 (diff)
downloadgcc-70bf0ee44017e8e26bb1bdcb6a3fd114c25c39c7.zip
gcc-70bf0ee44017e8e26bb1bdcb6a3fd114c25c39c7.tar.gz
gcc-70bf0ee44017e8e26bb1bdcb6a3fd114c25c39c7.tar.bz2
c++: Fix typo in RAW_DATA_CST build_list_conv subsubconv hanling [PR119563]
The following testcase ICEs (the embed one actually doesn't but dereferences random uninitialized pointer far after allocated memory) because of a typo. In the RAW_DATA_CST handling of list conversion where there are conversions to something other than initializer_list<{{,un}signed ,}char>, the code now calls implicit_conversion for all the RAW_DATA_CST elements and stores them into subsubconvs array. The next loop (done in a separate loop because subsubconvs[0] is handled differently) attempts to do the for (i = 0; i < len; ++i) { conversion *sub = subconvs[i]; if (sub->rank > t->rank) t->rank = sub->rank; if (sub->user_conv_p) t->user_conv_p = true; if (sub->bad_p) t->bad_p = true; } rank/user_conv_p/bad_p merging, but I mistyped the index, the loop iterates with j iterator and i is subconvs index, so the loop effectively doesn't do anything interesting except for merging from one of the subsubconvs element, if lucky within the subsubconvs array, if unlucky not even from inside of the array. The following patch fixes that. 2025-04-03 Andrew Pinski <quic_apinski@quicinc.com> Jakub Jelinek <jakub@redhat.com> PR c++/119563 * call.cc (build_list_conv): Fix a typo in loop gathering summary information from subsubconvs. * g++.dg/cpp0x/pr119563.C: New test. * g++.dg/cpp/embed-26.C: New test.
Diffstat (limited to 'libjava/classpath/lib')
0 files changed, 0 insertions, 0 deletions