> The offender is almost certainly the 'generic expander'.
I tried to make a simpler example which reproduces the same error:
************************************************************************************
target memsize 8 byteorder little pointersize 32 wordsize 32;
export main;
foo (bits64 x) {
return (%and(x,1::bits64));
}
foreign "C" main (bits32 argc, "address" bits32 argv) {
foo (10::bits64);
foreign "C" return (0);
}
************************************************************************************
$ qc-- -globals simple.c--
This can't happen: Asked for temporary in space `general-purpose
temporaries' with unsupported width 64
Fatal error: exception Impossible.Impossible("Asked for temporary in space
`general-purpose temporaries' with unsupported width 64")
***************************************************************************************
Seemingly, this message is coming from talloc.ml where
let () = if not (existsEq width space.S.widths) then
Impossible.impossible ("Asked for temporary in space `" ^
space.S.doc ^ "' with unsupported width "
^
string_of_int width) in
According to the error message, I guess that the C-- compiler failed to
provide available registers as temporary space in 64 bits because the
machine did not support 64 width. Maybe, a certain allocation mechanism has
a bug, which is what you mean by "generic expander". Does it?
Just for curiosity, I replaced bits64 with bits32 in Hendrik's code, then
his code got compiled without any complaints.
Wonsoek
_______________________________________________
Cminusminus mailing list
[email protected]
https://cminusminus.org/mailman/listinfo/cminusminus