https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66355
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> --- PR 65197 has links to a number of related PRs. The middle-end has no code to handle the case where we detect "late" (i.e. not in the front-end) that the initialization is constant.