This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/21297] [4.0/4.1 Regression] buf[i+i]=0 stores buf[i] when -O2
- 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: 30 Apr 2005 16:00:21 -0000
- Subject: [Bug middle-end/21297] [4.0/4.1 Regression] buf[i+i]=0 stores buf[i] when -O2
- References: <20050430155432.21297.akr@m17n.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-30 16:00 -------
This is another expand issue:
;; *((char *) (unsigned int) (i + i) + buf) = 0
(insn 27 25 0 (set (mem:QI (plus:SI (mult:SI (reg/v:SI 60 [ i ])
(const_int 1 [0x1]))
(reg/v/f:SI 61 [ buf ])) [0 S1 A8])
(const_int 0 [0x0])) -1 (nil)
(nil))
Why is it multiplying by one and not by two.
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c |middle-end
Ever Confirmed| |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2005-04-30 16:00:20
date| |
Summary|buf[i+i]=0 stores buf[i] |[4.0/4.1 Regression]
|when -O2 |buf[i+i]=0 stores buf[i]
| |when -O2
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21297