gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] Follow up for bugs reported June 17


From: Gaius Mulley
Subject: Re: [Gm2] Follow up for bugs reported June 17
Date: Thu, 15 Oct 2009 14:45:37 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

SiTex Graphics <address@hidden> writes:

> In the course of getting the application to work, I coded around what
> seems to be a bug in the conversion of record fields that are small
> cardinals or integers.  The short test module below illustrates the
> bug.  Compiled with
>
> gm2 -I. -fiso -fmakeall -o test test.mod
>
> The result is:
>
> in = 1718
> out = 12977846
>
> I expect the compiler either to issue a type incompatibility error or
> to produce the correct result.  Note that either removing the in2
> field or setting that field to 0 produces a correct result. Maybe that
> will help track this one down.
>
> This situation crops up quite a bit in the test application, and I
> think this bug is likely causing at least some of the runtime
> failures.
>
> Thanks,
> Scott
>
>
> MODULE test;
>
> FROM SYSTEM IMPORT CARDINAL16;
> IMPORT STextIO, SWholeIO;
>
> TYPE
>   InOut = RECORD
>     in : CARDINAL16;
>     in2 : CARDINAL16; (* remove this and it works?! *)
>     out : CARDINAL;
>   END;
>
> VAR
>   io : InOut;
>
> BEGIN
>   io.in:=1718;
>   io.in2:=198; (* or set in2 to 0 and it works *)
>
>   io.out:=io.in;
>
>   STextIO.WriteString("in = ");
>   SWholeIO.WriteCard(VAL(CARDINAL,io.in),1);
>   STextIO.WriteLn;
>
>   STextIO.WriteString("out = ");
>   SWholeIO.WriteCard(io.out,1);
>   STextIO.WriteLn;
> END test.

Hi Scott,

now fixed in the latest cvs..

regards,
Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]