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 10:43:23 +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 #41 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-06-03 10:41:55 UTC ---
> Can you explain why it cannot pass on strict-alignment targets? The read is
> done through a type with explicit low alignment, so strict alignment targets
> just shouldn't use an aligned load but unaligned load in that case.
What do you mean by an unaligned load? Most targets don't have that. If you
want to support
typedef unsigned int U __attribute__((__aligned__ (1)));
U id (U *u)
{
return *u;
}
on strict-alignment targets, you'll have to implement it in the middle-end. In
the meantime (and for 4.6.x), the test cannot pass.