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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-03-21
     Ever confirmed|0                           |1

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
IMO that's not clear:

"Structure or union types are always left-justified, whether stored in
registers or memory. The individual fields of a structure (or containing
storage unit in the case of bit fields) are subject to promotion into registers
based on their type using the same rules as apply to scalar values (with the
addition that a single-precision floating-point number assigned to the left
half of an argument slot will be promoted into the corresponding even-numbered
float register.). Any union type being passed directly is subject to promotion
into the appropriate integer register(s)."

I don't see how "The individual fields |...] are subject to promotion into
registers based on their type using the same rules as apply to scalar values"
applies to an array field, since its type is not scalar.

Admittedly, this does not directly apply to a structure field either, but I
think that GCC does apply the rule recursively in this case.

AFAIK we have never implemented this interpretation for array fields, so I
wonder whether it's not too late now.

Reply via email to