This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20794] New: [4.0/4.1 Regression] Miscompilation with __attribute ((aligned))
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Apr 2005 14:46:07 -0000
- Subject: [Bug c/20794] New: [4.0/4.1 Regression] Miscompilation with __attribute ((aligned))
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
extern void abort (void);
typedef int T __attribute__((aligned));
struct S { T a[2]; } s;
void *p[2];
int
main (void)
{
p[0] = &s.a[0];
p[1] = &s.a[1];
if (p[0] == p[1])
abort ();
return 0;
}
is miscompiled on at least i386, x86_64, ppc32 and ppc64, at all optimization
levels. Works correctly in C++.
--
Summary: [4.0/4.1 Regression] Miscompilation with __attribute
((aligned))
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20794