Page 2 of 2

Re: Compiler trap in Real64 op ADR(x)

Posted: Wed Jul 29, 2020 8:39 am
by Robert
adimetrius wrote:P.S. It seems I can't post at the other discussion page
No!

The policy is described here: https://wiki.blackboxframework.org/inde ... tin_Boards .

Re: Compiler trap in Real64 op ADR(x)

Posted: Mon Aug 03, 2020 7:46 am
by Josef Templ
a bug fix as proposed by adimetrius has been prepared for the center version.

Thanks for the careful analysis and bug fix proposal.

- Josef

Re: Compiler trap in Real64 op ADR(x)

Posted: Wed Oct 14, 2020 9:29 am
by Josef Templ
adimetrius wrote:For a permanent correction, why not amend CheckForm?

It would be the most 'straight' logic: CheckForm checks that the format of data is correct. It is correct to convert a Pointer to a Real64, and that't what CheckForm should return. Amending other procedures looks as a workaround to me.

Code: Select all

   PROCEDURE CheckForm (form: BYTE; VAR mf: INTEGER);
   BEGIN
      IF form = Real32 THEN mf := 0
      ELSIF form = Real64 THEN mf := 4
      ELSIF form = Int32 THEN mf := 2
      ELSIF form = Pointer THEN mf := 2       (* this is the addition *)
      ELSE ASSERT(form = Int16); mf := 6
      END
   END CheckForm;
P.S. It seems I can't post at the other discussion page
@adimetrius
Are you still convinced that CheckForm is the best place for the fix?
I am asking because we had some discussion in the center about the best place for the fix.
To me it looks very plausible but I want to make sure that the original author of the proposal still supports it.

- Josef

Re: Compiler trap in Real64 op ADR(x)

Posted: Thu Oct 15, 2020 8:37 am
by adimetrius
Yes, I still believe CheckForm would be the most natural place for the fix.