during Wine 64bit build I get gcc -c -O2 acmstream.i acmstream.c: In function ‘AVIFILE_OpenCompressor’: acmstream.c:327:1: internal compiler error: in insert_save, at caller-save.c:1303 Please submit a full bug report, with preprocessed source if appropriate. See <http://bugs.opensuse.org/> for instructions. gcc version 4.5.0 20100331 (experimental) [trunk revision 157870] (SUSE Linux)
Created attachment 20322 [details] acmstream.i gcc -c -O2 acmstream.i started to reduce... likely attribute(ms_abi) related I think.
We use a caller-save slot of VOIDmode for a DImode mem.
Short testcase: int __attribute__((ms_abi)) ACMStream_fnRead(int*iface,int start,int samples,int buffer){} typedef struct _IAVIStreamImpl { int sInfo; int has; } IAVIStreamImpl; extern int __attribute__((ms_abi)) aso(void*); int AVIFILE_OpenCompressor(IAVIStreamImpl *This) { if (This->has != 0) aso(&This->has); sre(&This->sInfo); } --- CUT --- This is some how related to the ms_abi attribute.
It is caused by revision 157849: http://gcc.gnu.org/ml/gcc-cvs/2010-03/msg00686.html
The patch: http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00466.html
The patch causing this regression was backported to 4.4 in r157850, causing current 4.4 to also regress.
P1 for the regression on the release branch.
(In reply to comment #5) > The patch: > > http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00466.html The test case in this patch breaks on 32-bit x86 because gcc complains that the ms_abi attribute is only available in 64-bit mode. The following fixes it: --- gcc/testsuite/gcc.target/i386/pr43662.c.~1~ +++ gcc/testsuite/gcc.target/i386/pr43662.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target lp64 } */ /* { dg-options "-O2" } */ int __attribute__((ms_abi)) ACMStream_fnRead(int*iface,int start,int
(In reply to comment #8) > +/* { dg-require-effective-target lp64 } */ Adding llp64 to that would be helpful, too.
I don't think llp64 there would be very much helpful, then all functions are ms_abi and thus no ABI changes in between functions and no ICE.
Thanks all. This is the updated patch: http://gcc.gnu.org/ml/gcc-patches/2010-04/msg01157.html
Subject: Bug 43662 Author: jiez Date: Mon Apr 19 10:02:52 2010 New Revision: 158509 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158509 Log: PR target/43662 * reginfo.c (reinit_regs): Set caller_save_initialized_p to false. testsuite/ PR target/43662 * gcc.target/i386/pr43662.c: New test. Added: trunk/gcc/testsuite/gcc.target/i386/pr43662.c Modified: trunk/gcc/ChangeLog trunk/gcc/reginfo.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 43662 Author: jiez Date: Mon Apr 19 10:04:43 2010 New Revision: 158510 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158510 Log: PR target/43662 * reginfo.c (reinit_regs): Set caller_save_initialized_p to false. testsuite/ PR target/43662 * gcc.target/i386/pr43662.c: New test. Added: branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/pr43662.c Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/reginfo.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
Subject: Bug 43662 Author: jiez Date: Mon Apr 19 10:06:13 2010 New Revision: 158511 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158511 Log: PR target/43662 * reginfo.c (reinit_regs): Set caller_save_initialized_p to false. testsuite/ PR target/43662 * gcc.target/i386/pr43662.c: New test. Added: branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/pr43662.c Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/reginfo.c branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
Should be fixed now on trunk, 4.5 and 4.4 branches.
Fixed.
*** Bug 44818 has been marked as a duplicate of this bug. ***