From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3136 invoked by alias); 14 Jan 2013 14:24:54 -0000 Received: (qmail 3067 invoked by uid 48); 14 Jan 2013 14:24:34 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/48766] [4.6/4.7/4.8 Regression] Infinite recursion in fold_binary_loc() Date: Mon, 14 Jan 2013 14:24: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-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.4 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2013-01/txt/msg01171.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48766 --- Comment #12 from Jakub Jelinek 2013-01-14 14:24:32 UTC --- Created attachment 29161 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29161 gcc48-pr48766.patch Untested fix. Seems in the previous option processing the negative options cancel their corresponding positive options (and vice versa), and only the last occurrence of the option from the command line remains and the patch just disables -fwrapv if -ftrapv comes after -fwrapv, and vice versa. So e.g. -fwrapv -ftrapv -fwrapv results in -fwrapv -fwrapv -ftrapv results in -ftrapv -fwrapv -ftrapv -fno-wrapv results in -ftrapv -ftrapv -fwrapv -fno-trapv results in -fwrapv etc.