This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: various C++ regressions with new compiler
- From: Jan Hubicka <jh at suse dot cz>
- To: Marcus Meissner <meissner at suse dot de>
- Cc: Philipp Thomas <pthomas at suse dot de>, Andreas Jaeger <aj at suse dot de>,Michael Matz <matz at suse dot de>, Jan Hubicka <jh at suse dot de>,Andreas Schwab <schwab at suse dot de>, gcc-patches at gcc dot gnu dot org,rth at cygnus dot com, mark at codesourcery dot com, jason at redhat dot com
- Date: Thu, 9 May 2002 12:39:03 +0200
- Subject: Re: various C++ regressions with new compiler
- References: <20020508135515.A18955@suse.de>
> Hi folks,
>
> We are getting various regressions in C++ programs with the new compiler
> Andreas Schwab checked in this morning.
>
> Important packages not compiling anymore on x86_64:
> - ghostscript-libraries (fixed by Werner by just disabling this part)
> - jade_dsl & openjade
> - arts
> I have attached the .ii file for arts as example, use g++ -O2.
Hi,
what happends is that i386.c is asked to pass as parameter record type with
size of 16 but with no field decls inside (only type decls).
I am not at all sure how this can happen, as I think only empty structures or
classes with no non-static data can have no field_decls.
However the i386.c classifies the both halves as "pass nowhere" and constructs
empty (parallel:BLK [ ]) as an container causing crash later.
For structures classified as single "no" we return NULL, so I guess it is safe
here as well. What will happen then? Will there be 16byte bubble on the
stack?
Can some C++ expert comment?
Anyway the attached patch avoids the crash so we can continue in testing.
Honza
Thu May 9 12:32:44 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.c (construct_container): Support "no no" classified types.
Index: i386.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
retrieving revision 1.393
diff -c -3 -p -r1.393 i386.c
*** i386.c 6 May 2002 16:07:03 -0000 1.393
--- i386.c 9 May 2002 10:32:40 -0000
*************** construct_container (mode, type, in_retu
*** 1964,1969 ****
--- 1964,1971 ----
default:
abort ();
}
+ if (n == 2 && class[0] == X86_64_NO_CLASS && class[1] == X86_64_NO_CLASS)
+ return NULL;
if (n == 2 && class[0] == X86_64_SSE_CLASS && class[1] == X86_64_SSEUP_CLASS)
return gen_rtx_REG (mode, SSE_REGNO (sse_regno));
if (n == 2