From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1B88E385C412; Fri, 19 Nov 2021 19:04:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B88E385C412 From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103231] [12 Regression] ICE (nondeterministic/stack overflow) on valid code at -O1 on x86_64-linux-gnu: Segmentation fault since r12-5014-g6b8b959675a3e14c Date: Fri, 19 Nov 2021 19:04:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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: Fri, 19 Nov 2021 19:04:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103231 --- Comment #12 from Andrew Macleod --- Yes, ranger can currently create some very deep call chains, especially as = it evaluates values around back edges. A general query on a stmt first checks if all the operands have been resolv= ed, and if they have not been, spawns another query to resolve the answer. If = we do this along a back edge, we get into another basic block which has not be= en processed at all, so every operand spawns another request and the stack gets deeper and deeper until it reaches a stmt that can be resolved.. then it unwinds with all the answers, folding and setting ranges as it goes. Note that each one of the query steps can involves 4 or 5 functions calls a= s we look at the kind of stmt, and process it, then get values on edges, etc etc= .=20 so each "depth" of query can be up to 5 function calls. I have analyzed the call patterns and have a solution I am working on now t= hat=20 almost completely flattens the call chains to satisfy the dependency resolution.=