This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/35616] [4.1/4.2/4.3/4.4 Regression] Incorrect code while O2 compling
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Mar 2008 15:30:01 -0000
- Subject: [Bug target/35616] [4.1/4.2/4.3/4.4 Regression] Incorrect code while O2 compling
- References: <bug-35616-15933@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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