From patchwork Mon May 7 14:35:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Bosscher X-Patchwork-Id: 157334 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 F4148B6FA7 for ; Tue, 8 May 2012 00:36:17 +1000 (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=1337006178; 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=KteoI7R 0Msf9dqzA3m0ZCUKBHMw=; b=SzyTJXwUsrdMCB6cVxSUKpTcQontXJPqvujJZ5B pPyBaQC2AjuDPT9NdTswL9FjXCRCJQQ+Z5/vOMyavIjPSVtSDGoF2uY/D9cl/wW7 3VKrJB2KoHNB0MnUFigkz9PBa5w38S+Fmlod+ApAwAhW7m+PMBSlIrRxslA/nHb9 ypNc= 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=c2LgLYR3FS9dpMsJuPq62ZUH90EbhxvqngMAk8kEDMbR6VAgewm++6Ca8aV74f 6LeL7FWcnDthDqEljePmWtcr01rI4S33s765VTL+4muIPaV8B8VvrVm8t6E4/c2r 1GzODrqLI8kQCE7ENnhgqgMOTc62lk50ol3I4rprvsmQU=; Received: (qmail 27718 invoked by alias); 7 May 2012 14:36:10 -0000 Received: (qmail 27517 invoked by uid 22791); 7 May 2012 14:36:09 -0000 X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-yw0-f47.google.com (HELO mail-yw0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 May 2012 14:35:56 +0000 Received: by yhjj56 with SMTP id j56so4774064yhj.20 for ; Mon, 07 May 2012 07:35:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.116.66 with SMTP id f42mr19715711yhh.70.1336401355879; Mon, 07 May 2012 07:35:55 -0700 (PDT) Received: by 10.100.173.8 with HTTP; Mon, 7 May 2012 07:35:55 -0700 (PDT) Date: Mon, 7 May 2012 16:35:55 +0200 Message-ID: Subject: [patch] PR53245 From: Steven Bosscher 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 Hello, This patch fixes PR53245. Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK for trunk? Ciao! Steven PR middle-end/53245 * gimplify.c (preprocess_case_label_vec_for_gimple): If low or high is folded to a type boundary value, verify that the resulting case label is still a care range. Index: gimplify.c =================================================================== --- gimplify.c (revision 187219) +++ gimplify.c (working copy) @@ -1658,6 +1658,10 @@ preprocess_case_label_vec_for_gimple (VEC(tree,hea && tree_int_cst_compare (high, max_value) > 0) high = max_value; high = fold_convert (index_type, high); + + /* We may have folded a case range to a one-value case. */ + if (tree_int_cst_equal (low, high)) + high = NULL_TREE; } }