From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BF3AE3856DFB; Fri, 12 May 2023 16:56:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF3AE3856DFB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683910578; bh=KX4BuPogWasum3XA9VPjs76n25l1jqyK+HfL/fbydQY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZsQzImTiipJUqFbeW2TBzQJlwg5h12RzN613zhFWInGEdGm0bDhRywLiQ6VGXm6sC npABI+y57l62i5fkmvl7gdBMfq2zpoq0vEGu7SOraEeVSjIg7X0Yd7m1+1EQDKqmOI DHjYlUzkvkVydCh3zDEAF8SU9DVjFKnni+HA/D7E= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106943] GCC building clang/llvm with LTO flags causes ICE in clang Date: Fri, 12 May 2023 16:56:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: ice-on-valid-code, needs-reduction X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: WAITING 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: keywords 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=3D106943 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|wrong-code |ice-on-valid-code --- Comment #23 from Andrew Pinski --- (In reply to Alexander Monakov from comment #6) > I'm giving this a shot, and with -flto-partition=3D1to1 there's a ranger = ICE > (below). >=20 > What's the current best practice for LTO debugging? I don't imagine there= 's > an easy way to identify which of 2000 lto1 invocation crashes, or attach = gdb > to it? Or at least generate a corefile? The easiest way to debug this kind of ICE is first get a reduced testcase. 1) Generate all of the preprocessed sources 2) Write a simple script which does the following: ** Remove the old object files ** compile the (already generated) preprocessed sources with -flto ** compile (link) the object files with the -r option and what ever options ** check if the ICE was there 3) Find the min number of preprocessed sources required to reproduce the is= sue 4) then reduce the remaining sources (either using delta or cvise or what e= ver tool you want to use) Hope this helps.=