This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/19627] New: if-conversion2 generates wrong code / crash on SH4
- From: "michael dot schwingen at lancom dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jan 2005 17:15:15 -0000
- Subject: [Bug rtl-optimization/19627] New: if-conversion2 generates wrong code / crash on SH4
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc generates wrong code on the test case when called with
/opt/cgcc-3.4.3-20050125/bin/sh-elf-gcc -m4 -S -Os -fomit-frame-pointer test2.c
Adding -fno-if-conversion2 creates working code. It seems that the code that
modifies the stack pointer to make space for function arguments is shifted
across a branch to a point where some paths through the function end up with a
wrong stack pointer at the end.
Attached: test2.c, test2.s, test2.c.27.flow2, test2.c.29.ce3
--
Summary: if-conversion2 generates wrong code / crash on SH4
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot schwingen at lancom dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: unknown-i686-linux
GCC host triplet: unknown-i686-linux
GCC target triplet: unknown-sh-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19627