https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121584
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > I might take a look this afternoon . This works: ``` diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc index 35c457406dc..3913e3255b3 100644 --- a/gcc/gimple-fold.cc +++ b/gcc/gimple-fold.cc @@ -4706,6 +4706,9 @@ clear_padding_bitint_needs_padding_p (tree type) bool clear_padding_type_may_have_padding_p (tree type) { + /* Assume poly sized types don't need padding. */ + if (POLY_INT_CST_P (TYPE_SIZE_UNIT (type))) + return false; switch (TREE_CODE (type)) { case RECORD_TYPE: ``` I will do some more testing and submit a patch.