From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9B1133858CDA; Sat, 31 Dec 2022 12:57:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B1133858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672491437; bh=zJXLA2vFHt8Btjr2BdvlZa22RgrTxeLTcb3GZ6FakRo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=s4F/lYekZbp9kkoMbibLG+tH4J2nuEd4XVE+r5ysM7UQuheunmIDapxp0gb/GZ2B+ qXJdqu5h6tvwLRmEHtuQ2qXuRQXfCp361OxoHNcNU2Qdn+OwFSH74fyTOMHC+eR1vI p03/00J3LpZidcGKD7mNg22ifxD/kv6zyksa6uq0= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108183] wrong code generated in the modula2 scaffold mechanism Date: Sat, 31 Dec 2022 12:57:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: assemble-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108183 --- Comment #17 from Iain Sandoe --- (In reply to Iain Sandoe from comment #16) > Created attachment 54170 [details] > Patch registration constructors >=20 > This modifies the registration CTORs that are currently defined in C++ to= be > defined as 'extern "C"' and registered to be run at program load time. >=20 > This is as described in comments #14 and 15. I did not post this yet - because I was wondering if there is more needed (i.e. that the code-gen should also do something similar when .mods are compiled). For example, if I take a random test case, and examine the symb= ols - I see these CTORs - but I do not see any CTORs for non-library modules. Of course, that could also be a separate patch - don't think I know the m2 sources well enough to attempt it at present, tho.=