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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
We end up calling store_integral_bit_field with bitsize 8026107440 which
eventually copies word-size chunks recursively here:

  /* Handle fields bigger than a word.  */

  if (bitsize > BITS_PER_WORD)
    {
...
      for (int i = 0; i < nwords; i++)
        {
...
          if (!store_bit_field_1 (op0, new_bitsize,
                                  bitnum + bit_offset,
                                  bitregion_start, bitregion_end,
                                  word_mode,
                                  value_word, reverse, fallback_p, false))
            {
              delete_insns_since (last);
              return false;
            }

RTL expansion is faced with a GIMPLE aggregate copy, but it seems the
fallback to use memcpy (if it exists...) isn't triggered for whatever
reason.  In the above loop for large nwords we could copy the large
"aligned" chunk in a more optimal way.

I suspect the limited actual size of 'v' deters us here.  You get
undefined behavior at compile-time.  Eh.  (maybe we should not DWIM
but simply cut the size of the copy)

Needs more analysis of where things go astray.

Reply via email to