This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/35504] incorrect code generated on i386 for C++ multiple inheritance, large return structures and regparm or fastcall calling conventions
- 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: 8 Mar 2008 04:55:06 -0000
- Subject: [Bug target/35504] incorrect code generated on i386 for C++ multiple inheritance, large return structures and regparm or fastcall calling conventions
- References: <bug-35504-1600@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from mikulas at artax dot karlin dot mff dot cuni dot cz 2008-03-08 04:55 -------
Created an attachment (id=15280)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15280&action=view)
a patch for the bug
A patch for gcc 4.3.0. When the function returns an aggregate value:
--- in fastcall mode, adjust %EDX, not %ECX
--- in regparm(1) mode, adjust 4(%ESP), not %EAX
--- in regparm(2) and regparm(3) mode, adjust %EDX, not %EAX
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35504