From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DDF85388BC87; Thu, 15 Dec 2022 08:35:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDF85388BC87 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671093341; bh=BZ0CLCKSmwaSkXb79ln30C299IlhaQ5s/+ubtOP6aMo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RXAy4YheTuNdK6QJUv1hh9H2oiVQzT/jE+VJrMLwV0a4Ug9YIoiSWNyrD+3FD00lx mlRBioECfO0H36ZnKYUV+ajv0XWWOGNgIT6ogfau2UwpZVXspAZBXctsQZ7UyYA2qu 5TN3dm6NdN6iCNwA9hEQQfkEEArizoSUYNd2OSL4= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108119] m2rte Seems like it should not be there at all Date: Thu, 15 Dec 2022 08:35:40 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 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=3D108119 --- Comment #1 from Richard Biener --- It looks to me the plugin isn't needed to compile m2 programs, it's merely = an additional tool to diagnose invalid code (that is maybe never be reached at runtime). So I'd suggest to put this plugin use behind some driver option. Alternatively the functionality could be lifted to the middle-end for examp= le by introducing an __attribute__((diagnose_if_invoked_on_function_entry)) that could then emit warning: 'error' is always invoked when executing 'foo' for void __attribute__((diagnose_if_invoked_on_function_entry)) error (); void foo () { error (); } but I understand the plugin does some whole-program analysis? That won't work with LTO at the point the plugin runs. That said, the immediate thing to do would be to make the plugin build/run dependent on plugin support.=