From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B8A6B3857C49; Fri, 5 Jan 2024 14:38:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B8A6B3857C49 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704465538; bh=0GhdYDni2mg3fkOFLpCHYUqfO+eThZQbiUqQg/NzgE8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BgkEU2KLNiyRS80mQgEozbL0gsBEa/t2ys1jZUt1xiDz1BEJW+sYrDeSrzFotArna KVT5sB1DyFoEMFYH0tfZhvbbF0PJyMM05xPuRRHkiZMbti+mMRl1+QS4xKzSe6Td+c O6VDdv948V7Mj6zFTqGuxe27u/DkTrk2cefwF+20= From: "xry111 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/112783] core dump on libxo when function is inlined Date: Fri, 05 Jan 2024 14:38:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xry111 at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: MOVED 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: cc 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=3D112783 Xi Ruoyao changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #10 from Xi Ruoyao --- (In reply to Jiang ChuanGang from comment #9) > I've encountered the same bug, and your solution does fix it. > But strangely enough, I can't reproduce it with code like the following. > The inevitable condition of this bug still puzzles me. Do you have any > thoughts on this. If you invoke an undefined behavior then anything can happen. And the condition is not "inevitable", if you use a different compiler or use diffe= rent compile options it may change as well. Do not try to predict the outcome of an undefined behavior. If you really = want an explanation you can try to trace how the compiler optimizes the program = (by adding -fdump-tree-all -fdump-rtl-all and investigating all the dumped file= s).=20 But such an explanation will only apply for the specific GCC version you are using, with a different GCC release the optimization passes will just chang= e.=20 So I don't think such an explanation will be useful or worth to find out. If you want to catch such bugs more easily try things like -fsanitize=3Dund= efined or -fsanitize=3Daddress.=