This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
libffi/i386 vs. -fno-pcc-struct-return
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: java at gcc dot gnu dot org
- Date: Mon, 26 Jan 2004 16:43:20 -0600 (CST)
- Subject: libffi/i386 vs. -fno-pcc-struct-return
- Reply-to: rittle at labs dot mot dot com
11 libffi test cases have been failing on FreeBSD/i386. The reason
appears to be this configuration (to mirror the system compiler):
/* Don't default to pcc-struct-return, we want to retain compatibility with
older gcc versions AND pcc-struct-return is nonreentrant.
(even though the SVR4 ABI for the i386 says that records and unions are
returned in memory). */
#define DEFAULT_PCC_STRUCT_RETURN 0
I found the failure by stepping through cls_1_1byte.exe and noting the
assumptions and then verifying that running the cases with
-fpcc-struct-return appears to fix the problem.
It seems like the correct fix is to add a new variant of the SVR4 ABI
which covers this case. Is there a libffi maintainer willing to fix
it, or would you like me to submit a patch? BTW, it would seem that
the best fix would track the actual compiler flags in use. Advise?
Regards,
Loren