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 target/35616] [4.1/4.2/4.3/4.4 Regression] Incorrect code while O2 compling



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


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