public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r15-349] PR modula2/115003 exporting a symbol to outer scope with a name clash causes ICE
@ 2024-05-09 18:36 Gaius Mulley
  0 siblings, 0 replies; only message in thread
From: Gaius Mulley @ 2024-05-09 18:36 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bc5afdf14ccf8375f7fb3de2be1121aaf550f8aa

commit r15-349-gbc5afdf14ccf8375f7fb3de2be1121aaf550f8aa
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Thu May 9 19:35:20 2024 +0100

    PR modula2/115003 exporting a symbol to outer scope with a name clash causes ICE
    
    An ICE will occur if an unknown symbol is exported and causes a name
    clash.  The error mechanism attempts to find the scope of an unknown
    symbol.  This patch adds a missing case clause to GetScope and returns
    NulSym if the scope is an unknown symbol.
    
    gcc/m2/ChangeLog:
    
            PR modula2/115003
            * gm2-compiler/SymbolTable.mod (GetScope): Add UndefinedSym
            case clause and return NulSym.
    
    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>

Diff:
---
 gcc/m2/gm2-compiler/SymbolTable.mod | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/m2/gm2-compiler/SymbolTable.mod b/gcc/m2/gm2-compiler/SymbolTable.mod
index f5890ec684fe..f206a47dff78 100644
--- a/gcc/m2/gm2-compiler/SymbolTable.mod
+++ b/gcc/m2/gm2-compiler/SymbolTable.mod
@@ -12449,6 +12449,7 @@ BEGIN
       ConstLitSym        : RETURN( ConstLit.Scope ) |
       ConstStringSym     : RETURN( ConstString.Scope ) |
       ConstVarSym        : RETURN( ConstVar.Scope ) |
+      UndefinedSym       : RETURN( NulSym ) |
       PartialUnboundedSym: InternalError ('should not be requesting the scope of a PartialUnbounded symbol')
 
       ELSE

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-09 18:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-09 18:36 [gcc r15-349] PR modula2/115003 exporting a symbol to outer scope with a name clash causes ICE Gaius Mulley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).