[Bug tree-optimization/48377] [4.6/4.7 regression] miscompilation at -O3

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 3 11:11:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48377

--- Comment #43 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-06-03 11:10:35 UTC ---
> Conceptually it is no different from
> struct A { char c; unsigned int d; } __attribute__((packed));
> 
> unsigned int
> id (struct A *p)
> {
>   return p->d;
> }
> 
> which is handled.

Guess what?  We implement under-aligned scalar types in Ada, i.e. the
equivalent of typedef unsigned int U __attribute__((__aligned__ (1))) by
wrapping them up in a record type. ;-)  As soon as you give SImode to the type,
the game is over.



More information about the Gcc-bugs mailing list