https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109334
--- Comment #1 from Martin Uecker <muecker at gwdg dot de> --- Created attachment 54796 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54796&action=edit partial fix Simply removing the condition based on internal_p would make it work for the most important cases as in the attached patch. The check for constant sizes already prevents the original ICE.