aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2022-03-21 09:57:28 -0400
committerJason Merrill <jason@redhat.com>2022-03-21 16:47:04 -0400
commit24d51e749570dcb85bd43d3b528f58ad6141de26 (patch)
treeb03f3d2b85f39d1aaf47e87fc2ebc514b814ac7e /gcc/fold-const.cc
parente3e191b4104c7d6a177f66dbb77cabf05ab63781 (diff)
downloadgcc-24d51e749570dcb85bd43d3b528f58ad6141de26.zip
gcc-24d51e749570dcb85bd43d3b528f58ad6141de26.tar.gz
gcc-24d51e749570dcb85bd43d3b528f58ad6141de26.tar.bz2
c++: designated init and aggregate members [PR103337]
Our C++20 designated initializer handling was broken with members of class type; we would find the relevant member and then try to find a member of the member with the same name. Or we would sometimes ignore the designator entirely. The former problem is fixed by the change to reshape_init_class, the latter by the change to reshape_init_r. PR c++/103337 PR c++/102740 PR c++/103299 PR c++/102538 gcc/cp/ChangeLog: * decl.cc (reshape_init_class): Avoid looking for designator after we found it. (reshape_init_r): Keep looking for designator. gcc/testsuite/ChangeLog: * g++.dg/ext/flexary3.C: Remove one error. * g++.dg/parse/pr43765.C: Likewise. * g++.dg/cpp2a/desig22.C: New test. * g++.dg/cpp2a/desig23.C: New test. * g++.dg/cpp2a/desig24.C: New test. * g++.dg/cpp2a/desig25.C: New test.
Diffstat (limited to 'gcc/fold-const.cc')
0 files changed, 0 insertions, 0 deletions