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: Gaius Mulley
Subject: Re: Internal compiler error (should be diagnostic error)
Date: Thu, 09 May 2024 23:53:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

john o goyo <jog37@riddermarkfarm.ca> writes:

> 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

Hi John,

all pushed and gm2 now issues an error message (rather than an ICE :-)

$ gm2 Test.mod 
Test.mod:11:9: error: symbol 'CardType' is already declared in this scope, use 
a different name or remove the declaration
   11 |  EXPORT CardType;
      |         ^~~~~~~~
Test.mod:7:17: error: symbol 'CardType' also declared in this module
    7 | TYPE CardType = CARDINAL;
      |                 ^~~~~~~~

regards,
Gaius



reply via email to

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