From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7249 invoked by alias); 18 Feb 2014 15:50:32 -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 6996 invoked by uid 48); 18 Feb 2014 15:50:00 -0000 From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/60174] [4.9 regression] ICE on ACATS cc3305a Date: Tue, 18 Feb 2014 15:50:00 -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: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.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: 2014-02/txt/msg01852.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60174 --- Comment #21 from Eric Botcazou --- It's reassociation, namely optimize_range_tests, doing SSA_NAME propagation when building ranges in init_range_entry. The immediate fix is: Index: tree-ssa-reassoc.c =================================================================== --- tree-ssa-reassoc.c (revision 207796) +++ tree-ssa-reassoc.c (working copy) @@ -1840,7 +1840,8 @@ init_range_entry (struct range_entry *r, if (exp != NULL_TREE) { - if (TREE_CODE (exp) != SSA_NAME) + if (TREE_CODE (exp) != SSA_NAME + || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (exp)) break; stmt = SSA_NAME_DEF_STMT (exp); The range test is still optimized, but the SSA_NAME is not replaced anymore.