This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: various C++ regressions with new compiler


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]