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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Robert Hölzl from comment #11)
> ARE YOU SURE??
> 
> Ok given you are right, then how can I attach the alignment attribute to the
> uint32_t instead of the pointer?
> 
> I tested 
> 
>      uint32_t x = *(uint32_t * __attribute__ ((__aligned__(1))) ) y;
> 
> as well as
> 
>      uint32_t x = *(__attribute__ ((__aligned__(1))) uint32_t *) y;
> 
> but neither of them did generate the expected code (without LDRD)...

You need to use a seperate typedef for the unaligned uint32_t.
typedef uint32_t __attribute__((aligned(1))) u32_u;

Reply via email to