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 middle-end/21082] &a[b] - &a[c] is not folded to b - c


------- Additional Comments From phython at gcc dot gnu dot org  2005-04-19 14:57 -------
 Yup, the dumps from the c++ front end is:
;; Function size_t f(size_t, size_t) (_Z1fjj)

size_t f(size_t, size_t) (b, c)
{
<bb 0>:
  return (size_t) (((int) &a[b] - (int) &a[c]) /[ex] 4);

}

 and the C front-end dump is:
;; Function f (f)

f (b, c)
{
<bb 0>:
  return (size_t) (b - c);

}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-19 14:57:39
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21082


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