Thanks Hartmut for your patch and explanation, but this line:
if ( (CLRINFO->ncolors&GrCVALUEMASK) != CLRINFO->ncolors )
breaks the 24bpp driver, it must be:
if ( ((CLRINFO->ncolors-1)&GrCVALUEMASK) != CLRINFO->ncolors-1)
Nevertheless the real bug is that: 1L << 32 == 1 !!!!!! This is what breaks bccbgi (and even modetest) in 32 bpp mode.
I have now a patch that seems to work, but I want to test it with every plattform/color depth before release it.
Greetings, M.Alvarez