On 1/3/25 6:39 AM, Jakub Jelinek wrote:
On Thu, Dec 19, 2024 at 11:56:10AM -0500, Jason Merrill wrote:
Looks right.
So, I've tried to construct a testcase, but turns out modules.cc just
doesn't handle structured bindings at namespace scope at all, so it is
premature to try to get the ordering right in it.
The first patch contains the attempt to turn dr2867-5.C testcase into
a module header testcase with a fix for the first ICE I've run into
(but it ICEs immediately elsewhere, the assumption that all namespace
scope decls have names is all around).
How about giving it a name? That would seem useful for debugging as well.
The second patch is much simpler testcase which doesn't care about ordering
of anything and ICEs without/with the other patches the same.
Should be all !DECL_NAME (decl) MK_unique? Or just
DECL_DECOMPOSITION_P (decl) && !DECL_NAME (decl)?
Structured bindings can't be redeclared, so I guess they are unique.
Jakub