pgcc-1.1.1 glibc-2.1.1 strptime.c forbidden register
Jeffrey A Law
Fri Apr 9 12:56:00 GMT 1999
In message < Pine.LNX.firstname.lastname@example.org >you write:
> strptime.c: In function `strptime_internal':
> strptime.c:818: fixed or forbidden register 3 (bx) was spilled for class
> This may be due to a compiler bug or to impossible asm statements or clause
> make: *** [/usr/src/redhat/BUILD/glibc/build-i686-linux/time/strptime.os
> ] Error 1
> make: Leaving directory `/home/system/redhat/BUILD/glibc/time'
> make: *** [time/subdir_lib] Error 2
> make: Leaving directory `/home/system/redhat/BUILD/glibc'
> make: *** [all] Error 2
> Initially, I was using -O6, then I tried -O3 as well as -O2 only for the
> problem be repeated each time. It only compiles with no optimization.
> I've seen reference to this specific problem in both teh pgcc and egcs list
> archives, but no definitive solution. I've also seen quite a few
> references to 'forbidden register' but have been unable to figure out how
> to fix the code from that information. Are there any patches for this
> problem or has anyone been able to get strptime.c to compile with optimization?
There's an asm in that code that requires 6 registers to satisfy. However,
when compiling with -fPIC the compiler is only allowed to allocate 5 registers.
Compiling with -fomit-frame-pointer will give the compiler an additional
register and it can compile the asm.
More information about the Gcc-bugs