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

--- Comment #5 from Dimitar Dimitrov <dimitar at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> Unlike PR 116148, pru is little-endian but 
> 
> This test in the testcase:
>   if (sizeof (union with_fam_2) != __alignof__ (int))
>     __builtin_abort ();
> 
> 
> is wrong.

If we can assume that "sizeof(char) <= __alignof__ (int)", then I think this
case is valid and ok. To my understanding, idea is to ensure that the union
size would be such that the "int b[]" variable array would be placed on aligned
address. BTW, that check passes on pru.

What fails on pru is:
  if (sizeof (struct only_fam_2) != sizeof (int))
    __builtin_abort ();

I think we need to separate it into a different file, and filter it for "target
pcc_bitfield_type_matters".

Reply via email to