This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49444] IV-OPTs changes an unaligned loads into aligned loads incorrectly
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 Jun 2011 20:08:48 +0000
- Subject: [Bug tree-optimization/49444] IV-OPTs changes an unaligned loads into aligned loads incorrectly
- Auto-submitted: auto-generated
- References: <bug-49444-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49444
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-16 20:08:43 UTC ---
Well, I'm 100% sure this is just the age-old bug that GCC can't expand
misaligned indirect-refs (or nowadays mem-refs and target-mem-refs) on
strict-align targets properly.
Try the following on any GCC version:
typedef int myint __attribute__((aligned(1)));
int foo(myint *p)
{
return *p;
}
int main()
{
char c[5] = {};
return foo(&c[1]);
}
it'll fault on any strict-align target since forever. Now it would
indeed be nice if _finally_ somebody would go and fix that ...
Dup of ....