From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 339363858D1E; Mon, 19 Dec 2022 23:45:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 339363858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671493543; bh=FOlgGrXkZDJ42PwcDGfHk8CE4G+hVHC4CkhKrDXXRnE=; h=From:To:Subject:Date:From; b=fQQy75/vFSRSY12E2250w5E4jQh2tteqP2lrnm1XBvycxLHvvLNPxMUhG9uKwPe/u zzYGF9h+FaQPRHK9aCM/EC0FIh+DTk9j6Z6lfFBtgWJP1j+UdHaJt8pV57jN0k8i78 nAseBIitBxmhAhQy2ipjmKh4/J/rLYCLD11qeHuE= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108183] New: wrong code generated in the modula2 scaffold mechanism Date: Mon, 19 Dec 2022 23:45:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 108183 Summary: wrong code generated in the modula2 scaffold mechanism Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: modula2 Assignee: gaius at gcc dot gnu.org Reporter: iains at gcc dot gnu.org Target Milestone: --- On m32 Darwin, we see very many failures like: /Volumes/ramdisk/ccPnX6B8.s:379:non-relocatable subtraction expression, "__M2_dtoa_ctor" minus "L5$pb" /Volumes/ramdisk/ccPnX6B8.s:379:symbol: "__M2_dtoa_ctor" can't be undefined= in a subtraction expression =3D=3D=3D It seems that the function declarations for '__M2_dtoa_ctor' (and other imported module ctors) are declared with TREE_STATIC() set, which indicates that there is a definition in the TU (which there is not) - they should be declared as external. So far, I could not figure out where these decls are built and what controls whether they are considered external or not.=