This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/14470] [tree-ssa] trouble with post-increment


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]