This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/53516] New: Vectorization and memset recognition miscompile bitfield stores
- 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: Tue, 29 May 2012 13:11:50 +0000
- Subject: [Bug tree-optimization/53516] New: Vectorization and memset recognition miscompile bitfield stores
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53516
Bug #: 53516
Summary: Vectorization and memset recognition miscompile
bitfield stores
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: rguenth@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
The following is miscompiled at -O3.
extern void abort (void);
struct Foo
{
char a : 1;
char b : 7;
};
struct Foo x[256];
int y[256];
void __attribute__((noinline,noclone)) bar (int n)
{
int i;
for (i = 0; i < n; ++i)
{
x[i].a = 0;
y[i] = 3;
}
}
int main()
{
x[5].b = 7;
bar (256);
if (x[5].b != 7)
abort ();
return 0;
}