From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20259 invoked by alias); 24 Mar 2015 12:51:09 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20197 invoked by uid 55); 24 Mar 2015 12:51:05 -0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/65515] [5 Regression] FAIL: gcc.c-torture/compile/limits-fndefn.c -O2 -flto -flto-partition=none (ICE) -- SIGSEGV for stack growth failure Date: Tue, 24 Mar 2015 13:15:00 -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: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg02562.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65515 --- Comment #8 from rguenther at suse dot de --- On Tue, 24 Mar 2015, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65515 > > --- Comment #7 from Jakub Jelinek --- > Created attachment 35124 > --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35124&action=edit > gcc5-pr65515.patch > > Lightly tested fix. Basically, most of DFS::DFS_write_tree is now moved into a > loop in DFS::DFS, and for most worklist items we see them twice, once with NULL > w.cstate (that will result in pushing further worklist items to the stack) and > then again with non-NULL w.cstate (which is the part of DFS_write_tree at the > end of function. > The patch reorders the processing of trees embedded in a tree, we'll process > the last inserted once before the earlier inserted ones for the same tree, not > sure if that is a problem or not, but from the DFS POV they are all children of > the same tree. If that would be a problem, it would be possible to rewrite > DFS_write_tree_body to call DFS_write_tree in reverse order. But I hope it > isn't a problem. This shouldn't be a problem indeed.