This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/30787] New: [4.1 Regression] Strength reduction bug
- 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: 13 Feb 2007 16:18:51 -0000
- Subject: [Bug rtl-optimization/30787] New: [4.1 Regression] Strength reduction bug
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
struct S
{
int *s;
};
void
test (int x, struct S *y)
{
int i;
for (i = 0; i < x; i++)
{
if (y)
y->s[i] += 1;
}
}
int
main ()
{
test (1, (void *) 0);
return 0;
}
is miscompiled at -O2 in 4.1.x, works with -O2 -fno-strength-reduction or
-O2 -floop-optimize2, works with 3.2.x, 3.4.x and 4.2.
--
Summary: [4.1 Regression] Strength reduction bug
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
GCC target triplet: x86_64-linux, i?86-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30787