From patchwork Sat Dec 1 21:59:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 203154 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 2559A2C0093 for ; Sun, 2 Dec 2012 08:59:43 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1355003984; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=CAnNgJ3 VgQiFeOzagR1/9p0jesk=; b=R1n7/F10irAEFWBNQ99o4E2qacVH8HtcqPqaxop H+WSJ8x8oQrPO+FRDx0aZfenzIXAGdGmweZycILpDRZy3GaUxlp4IjLUAxqAEEeP ZKhF8ffTBqDWyo4cHQ8KSXOz+47XqeSJmLRZ7d2E8jqOkITKuMBEaAqsIrYjtuoF 7Atw= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=KCnUpQ8WfEOu039GwmKP7RvJN3ZUFB7xDRTIZrBxUncU/KJGiuelUNUsKtN3N4 lj9nq69NcrgEhq5sHaLwdnZ0k9HwYBc04zizhsFmXS7vW2yJ4f/Z3vmOlmWCVE2y tk250asAHmKoFbapmb/fqhF+EPTceUw31L9WCBYH+junU=; Received: (qmail 14609 invoked by alias); 1 Dec 2012 21:59:40 -0000 Received: (qmail 14539 invoked by uid 22791); 1 Dec 2012 21:59:39 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL, BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KHOP_RCVD_TRUST, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-we0-f175.google.com (HELO mail-we0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 01 Dec 2012 21:59:30 +0000 Received: by mail-we0-f175.google.com with SMTP id z53so594204wey.20 for ; Sat, 01 Dec 2012 13:59:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.100.73 with SMTP id ew9mr3312652wib.21.1354399169180; Sat, 01 Dec 2012 13:59:29 -0800 (PST) Received: by 10.216.153.132 with HTTP; Sat, 1 Dec 2012 13:59:29 -0800 (PST) Date: Sat, 1 Dec 2012 22:59:29 +0100 Message-ID: Subject: [patch stmt.c]: Fix SjLj exception handling From: Kai Tietz To: GCC Patches X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, recent 4,8 has regressions in g++.old-deja/g++.eh for the catch*.C tests, if exception-mechanism is SjLj. This is due an off by one failure in an decreasing loop. ChangeLog 2012-12-01 Kai Tietz * stmt.c (expand_sjlj_dispatch_table): Fix off by one. Tested for i686-w64-mingw32, x86_64-unknown-linux-gnu. Ok for apply? Regards, Kai Index: stmt.c =================================================================== --- stmt.c (Revision 193985) +++ stmt.c (Arbeitskopie) @@ -2282,7 +2282,7 @@ expand_sjlj_dispatch_table (rtx dispatch_index, tree range = maxval; rtx default_label = gen_label_rtx (); - for (int i = ncases - 1; i > 0; --i) + for (int i = ncases - 1; i >= 0; --i) { tree elt = dispatch_table[i]; tree low = CASE_LOW (elt);