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/21297] [4.0/4.1 Regression] buf[i+i]=0 stores buf[i] when -O2


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


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