[Bug modula2/108183] wrong code generated in the modula2 scaffold mechanism
iains at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 20 12:34:45 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108183
--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
OK so it seems that the reason for the marking of these object to be static is
because that's what was requested, so the reason lies within the M2 symbol
table and handling of imports ...
* frame #0: 0x000000010002e34e
cc1gm2`::m2decl_BuildEndFunctionDeclaration(location_begin=0, location_end=0,
name="_M2_termios_ctor", returntype=0x0000000000000000, isexternal=0,
isnested=0, ispublic=1) at m2decl.cc:219
frame #1: 0x00000001000757ad
cc1gm2`::DeclareProcedureToGccSeparateProgram(Sym=6114) at M2GCCDeclare.c:7504
frame #2: 0x0000000100075829 cc1gm2`::DeclareProcedureToGcc(sym=6114) at
M2GCCDeclare.c:7527
frame #3: 0x000000010007cf4f
cc1gm2`::M2GCCDeclare_DeclareProcedure(sym=6114) at M2GCCDeclare.c:11648
frame #4: 0x0000000100057b36
cc1gm2`::Lists_ForeachItemInListDo(l=0x0000000106d00550,
P=SymbolKey_PerformOperation @ 0x00007ffeefbff110) at Lists.c:393
frame #5: 0x00000001000d96c9
cc1gm2`::SymbolTable_ForeachProcedureDo(Sym=155, P=SymbolKey_PerformOperation @
0x00007ffeefbff150) at SymbolTable.c:14153
frame #6: 0x000000010007cf91
cc1gm2`::M2GCCDeclare_DeclareProcedure(sym=155) at M2GCCDeclare.c:11653
frame #7: 0x00000001000cd22a cc1gm2`::SearchAndDo(t=0x0000000106d00590,
P=SymbolKey_PerformOperation @ 0x00007ffeefbff1a0) at SymbolKey.c:242
frame #8: 0x00000001000cd21b cc1gm2`::SearchAndDo(t=0x0000000106c1bc00,
P=SymbolKey_PerformOperation @ 0x00007ffeefbff1c0) at SymbolKey.c:241
frame #9: 0x00000001000cd21b cc1gm2`::SearchAndDo(t=0x0000000106c1b4f0,
P=SymbolKey_PerformOperation @ 0x00007ffeefbff1e0) at SymbolKey.c:241
frame #10: 0x00000001000cd21b cc1gm2`::SearchAndDo(t=0x0000000106c0c9d0,
P=SymbolKey_PerformOperation @ 0x00007ffeefbff200) at SymbolKey.c:241
frame #11: 0x00000001000cd21b cc1gm2`::SearchAndDo(t=0x0000000105f008f0,
P=SymbolKey_PerformOperation @ 0x00007ffeefbff220) at SymbolKey.c:241
frame #12: 0x00000001000cd717
cc1gm2`::SymbolKey_ForeachNodeDo(t=0x0000000105f00460,
P=SymbolKey_PerformOperation @ 0x00007ffeefbff240) at SymbolKey.c:505
frame #13: 0x00000001000d9720
cc1gm2`::SymbolTable_ForeachModuleDo(P=SymbolKey_PerformOperation @
0x00007ffeefbff268) at SymbolTable.c:14174
frame #14: 0x0000000100075c43
cc1gm2`::StartDeclareModuleScopeSeparate(scope=155) at M2GCCDeclare.c:7723
frame #15: 0x0000000100075e64 cc1gm2`::StartDeclareModuleScope(scope=155)
at M2GCCDeclare.c:7799
frame #16: 0x000000010007ca52
cc1gm2`::M2GCCDeclare_StartDeclareScope(scope=155) at M2GCCDeclare.c:11442
frame #17: 0x000000010006b96d cc1gm2`::DoModuleDeclare() at M2Code.c:256
frame #18: 0x000000010006bed9 cc1gm2`::M2Code_Code() at M2Code.c:470
frame #19: 0x000000010006c760 cc1gm2`::Compile(s=0x0000000106c1ed80) at
M2Comp.c:211
frame #20: 0x000000010006d4db
cc1gm2`::M2Comp_compile(filename=0x00007ffeefbffa6a) at M2Comp.c:760
frame #21: 0x00000001000454b7
cc1gm2`init_PerCompilationInit(filename="/source/test/hello.mod") at
init.cc:195
frame #22: 0x0000000100002115
cc1gm2`::gm2_parse_input_files(filenames=0x0000000106819cc0, filename_count=1)
at gm2-lang.cc:451
frame #23: 0x0000000100002146 cc1gm2`::gm2_langhook_parse_file() at
gm2-lang.cc:458
frame #24: 0x0000000101cc353a cc1gm2`::compile_file() at toplev.cc:444
frame #25: 0x0000000101cc6f7f cc1gm2`::do_compile(no_backend=false) at
toplev.cc:2125
frame #26: 0x0000000101cc74bd cc1gm2`toplev::main(this=0x00007ffeefbff4da,
argc=37, argv=0x00007ffeefbff518) at toplev.cc:2277
frame #27: 0x000000010251ecd2 cc1gm2`main(argc=37, argv=0x00007ffeefbff518)
at main.cc:39
More information about the Gcc-bugs
mailing list