[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guidance requested on narrowing down internal compiler error
From: |
john o goyo |
Subject: |
Re: Guidance requested on narrowing down internal compiler error |
Date: |
Sun, 7 Apr 2024 17:28:15 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
Greetings, Gaius.
On 2024-04-02 18:56, Gaius Mulley wrote:
Hi John,
I've git pushed the m2 trace flag -fm2-debug-trace=all,quad,line,token
to help track down the ICE
regards,
Gaius
I tried tracing all. Output is voluminous, so I piped it to a file.
Here is an extract therefrom:
./MCPublic.def:39: Statset = SET OF Compilerstatus;
./MCPublic.def:39: Statset = SET OF Compilerstatus;
./MCPublic.def:39: ^^^^^^^
./MCPublic.def:39:4051
./MCPublic.def:39: Statset = SET OF Cotoken: 3
token: 4
token: 5
token: 6
token: 7
[...]
token: 4085
token: 4086
token: 4087
token: 4088
token: 3
token: 4
token: 5
token: 6
token: 7
[...]
token: 1358
token: 1359
token: 1360cc1gm2: internal compiler error: not implemented yet
0x6d35cf m2linemap_internal_error
/home/build/opt/gcc/src/gcc-git/gcc/m2/gm2-gcc/m2linemap.cc:253
As this does not seem to help me, I searched for occurrences of "not
implemented yet" and found them in gcc/m2/gm2-compiler/SymbolTable.mod.
Adding some procedure context, the problem seems to be in the procedure
GetScope. The function GetPsym returns something not found in the CASE
statement.
So I tried to add more context, viz.
ELSE
snprintf(msg, 120, "GetScope: GetPsym(%d) returned known
SymbolType %d",
ORD(Sym), ORD(SymbolType));
InternalError (msg);
END
But this fails to compile as follows.
m2/gm2-compiler-boot/SymbolTable.c: In function unsigned int
SymbolTable_GetScope(unsigned int):
m2/gm2-compiler-boot/SymbolTable.c:18105:24: error: invalid cast from
type GetScope__T8 {aka SymbolTable_GetScope(unsigned
int)::GetScope__T8_a} to type void*
18105 | libc_snprintf (reinterpret_cast<void *> (msg),
static_cast<size_t> (120), (const char *) "GetScope: GetPsym(%d)
returned uknown SymbolType %d", 51, ((unsigned int) (Sym)), ((unsigned
int) (pSym->SymbolType)));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
m2/gm2-compiler-boot/SymbolTable.c: At global scope:
m2/gm2-compiler-boot/SymbolTable.c:5973:21: warning: NameKey_Name
GetConstStringContent(unsigned int) defined but not used [-Wunused-function]
5973 | static NameKey_Name GetConstStringContent (unsigned int sym)
The local variable msg is defined as an array of characters.
At this point, I am confused. Is my invocation of snprintf() not correct?
Sincerely,
john