gm2
[Top][All Lists]
Advanced

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

Re: Internal compiler error (should be diagnostic error)


From: john o goyo
Subject: Re: Internal compiler error (should be diagnostic error)
Date: Sat, 11 May 2024 10:08:49 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

Greetings, Andreas.

On 2024-05-09 06:21, Fischlin Andreas wrote:
Hi John,

I do not understand why this code should be legal PIM code. Within the scope of the local MODULE Inside the ident CardType is not known and you should not be able to export it.

Of course this has nothing to do with the gm2 compiler having difficulties to detect this coding error. But perhaps ‘unknown symbol’ means that? Admitted, not a very clear and helpful error message, but perhaps this is what’s going on?

Yes -- the original behaviour from gm2 was to stop with the message "not implemented yet" giving no indication of the cause (or even a line number in the file).  I changed this message to "unknown symbol" but there was still no line number.

Sincerely,
john


Regards,
Andreas


ETH Zurich
Prof. em. Dr. Andreas Fischlin
Systems Ecology - Institute of Biogeochemistry and Pollutant Dynamics
CHN E 24
Universitaetstrasse 16
8092 Zurich
SWITZERLAND


+41 44 633-6090 phone
+41 79 595-4050 mobile

             Make it as simple as possible, but distrust it!
________________________________________________________________________














On 8 May 2024, at 23:23, john o goyo <jog37@riddermarkfarm.ca> wrote:

Greetings, Gaius.

Here is Test.mod (greatly culled out of legacy working PIM code):

MODULE Test;
(*
 * Produces internal compiler error
 * Inside SymbolTable.GetScope, GetPsym() returns an unexpected token.
 *)

TYPE CardType = CARDINAL;

  MODULE Inside;

  EXPORT
       CardType;

  END Inside;

END Test.

Here is what happens:

=> gm2-git -c Test.mod
cc1gm2: internal compiler error: GetScope: unknown symbol
0x6d6beb m2linemap_internal_error
/home/build/opt/gcc/src/gcc-git/gcc/m2/gm2-gcc/m2linemap.cc:253
[...]

(I added some output to gm2-compiler/SymbolTable.mod to report.)

Sincerely,
john






reply via email to

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