[Bug d/123419] d: internal compiler error: in visit, at d/expr.cc:2224
ibuclaw at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 6 12:24:19 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123419
--- Comment #1 from Iain Buclaw <ibuclaw at gcc dot gnu.org> ---
(In reply to Iain Buclaw from comment #0)
> The var expression fails this assertion.
>
> gcc_assert (e->type->isConst ()
> && e->type->nextOf ()->ty == TY::Tvoid);
The assert expects the type of `__traits(initSymbol)` to be exactly
`const(void[])`, but because D strips const from arrays to allow passing slices
as mutable ranges to template functions, it got turned into `const(void)[]`.
Instead it should be `e->type->nextOf ()->isConst ()`.
More information about the Gcc-bugs
mailing list