This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/11772] New: Incorrect code generated with -mrtd and long long
- From: "mikulas at artax dot karlin dot mff dot cuni dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Aug 2003 17:11:25 -0000
- Subject: [Bug c/11772] New: Incorrect code generated with -mrtd and long long
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11772
Summary: Incorrect code generated with -mrtd and long long
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mikulas at artax dot karlin dot mff dot cuni dot cz
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i586-pc-linux-gnu
GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu
When using gcc in an environment where -mrtd is default calling convention, gcc calls long long operations like __divdi3 without -mrtd (on the other hand, it honours -mregparm when calling these functions). The resulting code crashes, because stack is incremented twice --- once at the end of __divdi3 and next after return to calling function.