This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/48377] [4.6/4.7 regression] miscompilation at -O3
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 3 Jun 2011 11:11:45 +0000
- Subject: [Bug tree-optimization/48377] [4.6/4.7 regression] miscompilation at -O3
- Auto-submitted: auto-generated
- References: <bug-48377-4@http.gcc.gnu.org/bugzilla/>
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.