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/44790] Bootstrap fails after MEM-REF merge



------- Comment #1 from sje at cup dot hp dot com  2010-07-02 19:49 -------
This may be related to &x + CST folding.  The bug only happens at -O1 or above.
I think I forgot to mention that in the original bug report.
When I look at the expand dump and the comparision to 123 I see:


(insn 17 16 18 3 x.c:8 (set (reg:DI 348)
        (zero_extend:DI (subreg/s/v:SI (reg/v/f:DI 339 [ ap+-4 ]) 4))) -1
(nil))

(insn 18 17 19 3 x.c:8 (set (reg/f:DI 347)
        (plus:DI (reg:DI 348)
            (const_int 4 [0x4]))) -1 (nil))

(insn 19 18 20 3 x.c:9 (set (reg:SI 349)
        (mem:SI (reg/f:DI 347) [0 MEM[(int *)ap_1 + 4B]+0 S4 A32])) -1 (nil))

(insn 20 19 21 3 x.c:9 (set (reg:BI 350)
        (eq:BI (reg:SI 349)
            (const_int 123 [0x7b]))) -1 (nil))

Instruction 17, where we set r348 to zero_extend of r339 looks wrong.  We
need to do a pointer extend here, I.e. (unspec 24) go generate an addp4.
r349 is not a valid pointer after instruction 17 and this generates the fault.


-- 


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


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