This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/14470] [tree-ssa] trouble with post-increment
- From: "dnovillo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Sep 2004 15:44:41 -0000
- Subject: [Bug tree-optimization/14470] [tree-ssa] trouble with post-increment
- References: <20040307221314.14470.lvoge@cs.vu.nl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dnovillo at gcc dot gnu dot org 2004-09-18 15:44 -------
Fixed. This is with current CVS mainline:
$ cat pr14470.c.t08.gimple
;; Function main (main)
main ()
{
static int C.0[1025] = {1024};
int d.1;
int D.1122;
int D.1123;
int D.1124;
int D.1125;
int D.1126;
int t[1025];
int d;
t = C.0;
d = 0;
d.1 = d;
D.1122 = t[d.1];
d = D.1122;
D.1123 = D.1122 + 1;
t[d.1] = D.1123;
D.1124 = t[1024];
D.1125 = t[0];
printf (&"%d %d %d\n"[0], d, D.1125, D.1124);
D.1126 = 0;
return D.1126;
}
$ gcc/xgcc -Bgcc -O2 pr14470.c -o a
pr14470.c: In function 'main':
pr14470.c:8: warning: incompatible implicit declaration of built-in function
'printf'
$ ./a
1024 1025 0
$ gcc/xgcc -Bgcc --version
xgcc (GCC) 4.0.0 20040917 (experimental)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The postincrement is emitted correctly out of the gimplifier.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|SUSPENDED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14470