https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95552

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
This simplified testcase has been broken a lot longer (back to GCC 8, at
least); my patch just extended the breakage to templates that already affected
non-templates.  The issue is that cloning the constructor doesn't handle the
VLA typedef properly, so the version in the clone ends up still referring to
the cloned function, which blows up.

struct ViewDom
{
  ViewDom(int i) { char (*a)[i]; }
};
void element( )
{
  ViewDom a(2);
}

Reply via email to