[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Typo in bitset ops trigger compiler assertion
From: |
Gaius Mulley |
Subject: |
Re: Typo in bitset ops trigger compiler assertion |
Date: |
Thu, 17 Nov 2022 11:22:30 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Runar Tenfjord <runar.tenfjord@gmail.com> writes:
> 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.
Hi Runar,
many thanks for the bug report - yes indeed verified the crash - and
will fix asap
regards,
Gaius