This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/21082] &a[b] - &a[c] is not folded to b - c
- From: "phython at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Apr 2005 14:57:40 -0000
- Subject: [Bug middle-end/21082] &a[b] - &a[c] is not folded to b - c
- References: <20050418030609.21082.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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