From 751c2d9a46f786381a90d5c8c49947fa0d9b7ee5 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 1 Jan 2023 15:42:03 +0000 Subject: modula-2: Module registration constructors need to be visible [PR108259]. In the current design the main executable links explicitly to the module registration construtors that it uses. This means that they must be visible in shared libraries. PR modula2/108259 gcc/m2/ChangeLog: * gm2-gcc/m2decl.cc (m2decl_DeclareModuleCtor): Make module registration constructors visible. --- gcc/m2/gm2-gcc/m2decl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/m2/gm2-gcc/m2decl.cc b/gcc/m2/gm2-gcc/m2decl.cc index 62bfefd..d849f8a 100644 --- a/gcc/m2/gm2-gcc/m2decl.cc +++ b/gcc/m2/gm2-gcc/m2decl.cc @@ -276,7 +276,7 @@ m2decl_DeclareModuleCtor (tree decl) /* Declare module_ctor (). */ TREE_PUBLIC (decl) = 1; DECL_ARTIFICIAL (decl) = 1; - DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN; + DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT; DECL_VISIBILITY_SPECIFIED (decl) = 1; DECL_STATIC_CONSTRUCTOR (decl) = 1; return decl; -- cgit v1.1