This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/29716] New: [4.2/4.3 Regression] Wrong code with arrays
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Nov 2006 22:01:47 -0000
- Subject: [Bug tree-optimization/29716] New: [4.2/4.3 Regression] Wrong code with arrays
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Testcase, compile at -O2:
void abort (void);
void exit (int);
int t = 100;
int main () {
int a[] = { 0, 1, 2 };
int *i = &a[sizeof(a)/sizeof(*a)];
i --;
while (i > a)
i[0] = 1+t, i--;
if (a[1] != 1+t)
abort ();
exit (0);
}
--
Summary: [4.2/4.3 Regression] Wrong code with arrays
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: wrong-code, alias
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29716