[Bug target/35616] [4.1/4.2/4.3/4.4 Regression] Incorrect code while O2 compling

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Mar 18 15:30:00 GMT 2008



------- Comment #14 from ubizjak at gmail dot com  2008-03-18 15:30 -------
(In reply to comment #12)
> Uros: the problem isn't cse.  It's already expand which creates broken code
> (it reads from and writes to (mem (plus (virtual-incoming-regs) (4)).
> But it does that only because the input tree is completely wrong (TER breaks
> this).

Yes, looking a bit more into the expand dump, it looks that gcc tries to fix
outgoing call stack by copying 'c' and 'd' into the position of 'listener' and
'b'. It accidentally overwrites 'listener' (and 'b', but this isn't used
anywhere). The code would work OK if 'listener' would be copied to a temporary
first.


-- 


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



More information about the Gcc-bugs mailing list