From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8816 invoked by alias); 15 Dec 2014 09:21:10 -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 8780 invoked by uid 48); 15 Dec 2014 09:21:07 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/64295] [5 Regression] ICE: SIGSEGV (infinite recursion) with -frounding-math -funsafe-math-optimizations Date: Mon, 15 Dec 2014 09:21: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: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth 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: 2014-12/txt/msg01702.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64295 --- Comment #3 from Richard Biener --- Ok, so we're folding g / 3 -> g * (1 / 3) and then applyign the same transform to 1 / 3 (because that's not constant folded with -frounding-math). I believe the option combination is a red herring, but ... The original fold-const.c code only transformed this if 1 / 3 constant folded but I used fold_binary in the pattern (because const_binop wasn't available at the point of writing it). Testing a patch.