From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 119DD384F002; Wed, 13 Jul 2022 12:13:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 119DD384F002 From: "lhyatt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/106274] Loss of macro tracking information with -flto Date: Wed, 13 Jul 2022 12:13:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: diagnostic, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: lhyatt at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2022 12:13:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106274 --- Comment #3 from Lewis Hyatt --- (In reply to Martin Li=C5=A1ka from comment #2) > I think it's a dup of PR80922. I think it's a bit different, if I understand correctly, PR80922 is asking = for something much more difficult, it wants the LTO streaming process to be abl= e to remember that it saw a diagnostic pragma, so that the LTO frontend can know about it when reading the data back in, and so suppress new warnings it is = able to generate due to the power of the interprocedural analysis it has access = to. That seems pretty challenging, given we still have a lot of bugs with just handling diagnostic pragmas properly in the non-LTO case. In my testcase here, the diagnostic is emitted by cc1/cc1plus while produci= ng the data for LTO, not by the LTO frontend, and everything is fine with it except that it gets printed with a barebones printer, rather than a virtual location aware printer.=