This is the mail archive of the gcc-bugs@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]

gcc-2.95.1 bug



platform:   sparc-sun-solaris2.5.1  (but can probably be duplicated anywhere)

versions:   gcc-2.8.1 and gcc-2.95.1

description: the macro HARD_REGNO_NREGS gets passed some pseudo reg numbers
in spite of the gcc documentation saying, and the macro name implying, that 
this will not happen.


to see this bug, prepend to the definition of

#define HARD_REGNO_NREGS(REGNO,MODE)

in  gcc/config/sparc/sparc.h  to start with this consistency check

	(REGNO >= FIRST_PSEUDO_REGISTER ? (abort(),0) :	\


This abort will be hit in building gcc for sparc-sun-solaris2.5.1 when it
uses itself (xgcc) to build it's runtime library at

	/libgcc2.c: In function `__fixunsdfdi':

in the register allocator function find_equiv_reg(). I have not yet traced
the logic flaw in find_equiv_reg, but no doubt there is one.


If you add another macro name with the old definition that allows pseudos

#define ANY_REGNO_NREGS(REGNO,MODE)

and use it instead of HARD_REGNO_NREGS in the two places in find_equiv_reg()
that used to say  HARD_REGNO_NREGS(regno,mode)  {uses on valueno, xregno, etc
seem to be OK as is} then the problem goes away and the build finishes.


I would like to talk to a register allocator maintainer about this and other
issues, but none seem to be listed in the MAINTAINERS list. If you can put 
me in touch with someone I would appreciate it.



Pete Lawrence.  (peter.lawrence@eng.sun.com)


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