https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108183

--- Comment #11 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Many thanks for the analysis.  Taking your idea and assuming
that Sym 6114 is a procedure then I think the correction is:

PROCEDURE IsExternal (sym: CARDINAL) : BOOLEAN ;
VAR
   mod: CARDINAL ;
BEGIN
   (* new code starts here.  *)
   IF IsProcedure (sym) AND IsExtern (sym)
   THEN
      RETURN TRUE
   END ;
   (* end of new code.  *)
   mod := GetScope(sym) ;
   REPEAT
      IF mod=NulSym
      THEN
         RETURN( FALSE )
      ELSIF IsDefImp(mod)
      THEN
         RETURN( mod#GetMainModule() )
      END ;
      mod := GetScope(mod)
   UNTIL mod=NulSym ;
   RETURN( FALSE )
END IsExternal ;


In gcc/m2/gm2-compiler/SymbolTable.mod procedures can be queried as IsExtern.
The ctors are special case created in gcc/m2/gm2-compiler/M2Scaffold.mod.
It looks as if the special case might not have been tested in IsExternal.

Reply via email to