Hello,
The following code trigger a compiler assertion:
MODULE test;
FROM libc IMPORT printf;
VAR
i : CARDINAL;
BEGIN
i := VAL(CARDINAL, VAL(BITSET, 0F0H) / (~VAL(BITSET, 0FH));
printf("i = %d\n", i);
END test.
I discovered this accidently when testing the bit operations in the supplied PIM library
and did not get it to work correctly.
There seems to be a type in the definition of XOR.
Line 114 in 'gcc/m2/gm2-libs-pim/BitByteOps.mod':
RETURN VAL (BYTE, VAL (BITSET8, left) DIV VAL (BITSET8, right))
Should be:
RETURN VAL (BYTE, VAL (BITSET8, left) / VAL (BITSET8, right))
This also to affect the other BitXXXOps files.
Best regards
Runar Tenfjord