From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29757 invoked by alias); 25 Mar 2009 23:09:29 -0000 Received: (qmail 29734 invoked by uid 48); 25 Mar 2009 23:09:16 -0000 Date: Wed, 25 Mar 2009 23:09:00 -0000 Subject: [Bug tree-optimization/39557] New: Invalid PDOM lead to infinite loop to be generated X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "davidxl at gcc dot gnu dot org" 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 X-SW-Source: 2009-03/txt/msg01785.txt.bz2 Compiling the attached source with the following options -Wall -fno-exceptions -O2 -fprofile-use=/blah -fno-rtti will result in a code with infinite loop. In DCE, special code is added to handle dead loops conservatively. However this requires PDOM information (control dep info) to be valid. The PDOM is created in unintialized variable warning, but gets invalidated before cddce pass (the incremental update does not work well). With the wrong CD info, DCE pass tries to eliminate the loop, but the exit edge fixup code ends up linking the precessor not to its post-dom bb, but to itself -- leading to infinite loop. A proposed patch will be posted to gcc-patches. David -- Summary: Invalid PDOM lead to infinite loop to be generated Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: davidxl at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39557