egcs-970922/m68k-motorola-sysv bootstrap failure

Manfred Hollstein manfred@ks.sel.alcatel.de
Thu Oct 2 08:01:00 GMT 1997


On Sun, 28 September 1997, 00:40:44, phdm@mail.macqel.be wrote:

    bootstrapping egcs-970922 fails on m68k-motorola-sysv because filebuf.cc
    is miscompiled by cc1plus.  Here is a scaled-down version of the problem.
    
    $ cat xxx.ii
    class filebuf {
      public:
        static const int openprot;  
    };
    const int filebuf::openprot = 0644;
    $ /usr/gnu/tmp/egcs/gcc/cc1plus -dp -O2 xxx.ii
    $ cat xxx.s
    	file	"xxx.ii"
    gcc2_compiled%:
    global __static_7filebuf openprot
                            ^---------------- NOTE THE SPACE IN THE SYMBOL NAME
    [snip]
    
    The resulting assembler file of course can't be assembled.  Where should I
    look at ?
    
    Philippe De Muyter

Looks  like  JOINER is not    defined  for this system;  but   anyway,
shouldn't cp/method.c look like:

#ifdef JOINER
  OB_PUTC ('_');
  build_qualified_name (context);
  OB_PUTC (JOINER);
#else
  OB_PUTS ("__static_");
  build_qualified_name (context);
  OB_PUTC ('_');       			/* NOTE this underscore here!  */
#endif

instead of:

#ifdef JOINER
  OB_PUTC ('_');
  build_qualified_name (context);
  OB_PUTC (JOINER);
#else
  OB_PUTS ("__static_");
  build_qualified_name (context);
  OB_PUTC (' ');
#endif

????

Thu Oct  2 16:45:38 1997  Manfred Hollstein  (manfred@lts.sel.alcatel.de)

	* cp/cp-tree.h (JOINER): Define to '_' if no '$' or '.' characters
	are allowed.

diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-970929.orig/gcc/cp/cp-tree.h egcs-970929/gcc/cp/cp-tree.h
*** egcs-970929.orig/gcc/cp/cp-tree.h	Mon Sep 29 21:04:58 1997
--- egcs-970929/gcc/cp/cp-tree.h	Thu Oct  2 09:58:51 1997
*************** extern int current_function_parms_stored
*** 1642,1647 ****
--- 1642,1649 ----
  
  #else /* NO_DOT_IN_LABEL */
  
+ #define JOINER '_'
+ 
  #define VPTR_NAME "__vptr"
  #define VPTR_NAME_P(ID_NODE) \
    (!strncmp (IDENTIFIER_POINTER (ID_NODE), VPTR_NAME, sizeof (VPTR_NAME) - 1))


Best wishes.
--
 Manfred Hollstein                               Alcatel, Dept. US/EC4
 < mailto:manfred@lts.sel.alcatel.de >             Lorenzstrasse 10
                                                 70435 Stuttgart
 Public PGP key on request                       Germany



More information about the Gcc-bugs mailing list