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

--- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> The ICE started with r10-2840-g70cdb21e579191fe9f0f1d45e328908e59c0179e
> but we generated silently wrong-code before that, I believe since
> r7-5812-ga271e415611a80f1e86e625fd61360e193d04474
>       ldr     r3, .L3
>       ldr     r3, [r3]
>       ldm     r3, {r0, r1}
>       b       bar
> is what we generate with that r244249 and up, which likely doesn't handle if
> a is not 8 (or just 4) byte aligned.

This change has removed the clobbering of MODE, which the mode of the TARGET
both for store_field:

/* Store the value of EXP (an expression tree)
   into a subfield of TARGET which has mode MODE and occupies
   BITSIZE bits, starting BITPOS bits from the start of TARGET.

and store_bit_field:

/* Generate code to store value from rtx VALUE
   into a bit-field within structure STR_RTX
   containing BITSIZE bits starting at bit BITNUM.

   FIELDMODE is the machine-mode of the FIELD_DECL node for this field.

by an integral mode based on the size of the expression:

  HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
  mode = smallest_mode_for_size (size * BITS_PER_UNIT, MODE_INT);

so it was supposed to be a progress.  Maybe I should have gone the other way
around and clobbered it on all paths...

Reply via email to