public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4943] modula2: Ensure that module registration constructors are 'extern' [PR108183].
@ 2023-01-01 9:29 Iain D Sandoe
0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2023-01-01 9:29 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d423e8dc59045d8f281dcb1a02559cb6f91456bf
commit r13-4943-gd423e8dc59045d8f281dcb1a02559cb6f91456bf
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Wed Dec 21 09:05:32 2022 +0000
modula2: Ensure that module registration constructors are 'extern' [PR108183].
The symbols for module registration constructors need to be external
or we get wrong code generated for targets that allow direct access to
local symbol definitions.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR modula2/108183
gcc/m2/ChangeLog:
* gm2-compiler/M2GCCDeclare.mod: Module registration constructors are
externs to the builder of m2_link.
Co-Authored-By: Gaius Mulley <gaiusmod2@gmail.com>
Diff:
---
gcc/m2/gm2-compiler/M2GCCDeclare.mod | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/m2/gm2-compiler/M2GCCDeclare.mod b/gcc/m2/gm2-compiler/M2GCCDeclare.mod
index 7e814b631ee..d784fbc40de 100644
--- a/gcc/m2/gm2-compiler/M2GCCDeclare.mod
+++ b/gcc/m2/gm2-compiler/M2GCCDeclare.mod
@@ -2294,6 +2294,11 @@ PROCEDURE IsExternal (sym: CARDINAL) : BOOLEAN ;
VAR
mod: CARDINAL ;
BEGIN
+ Assert (NOT IsDefImp (sym)) ;
+ IF IsProcedure (sym) AND IsExtern (sym)
+ THEN
+ RETURN TRUE
+ END ;
mod := GetScope(sym) ;
REPEAT
IF mod=NulSym
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-01 9:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-01 9:29 [gcc r13-4943] modula2: Ensure that module registration constructors are 'extern' [PR108183] Iain D Sandoe
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).