From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105806 invoked by alias); 2 Sep 2019 13:37:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 105514 invoked by uid 89); 2 Sep 2019 13:37:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=H*f:sk:HLjMdo9, H*f:Sn1, H*i:sk:HLjMdo9, H*i:Sn1 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Sep 2019 13:37:02 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D123B83BE3; Mon, 2 Sep 2019 13:37:01 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-139.ams2.redhat.com [10.36.116.139]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 461AC608AB; Mon, 2 Sep 2019 13:37:01 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id x82DavPe006882; Mon, 2 Sep 2019 15:36:57 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x82DaqZZ006881; Mon, 2 Sep 2019 15:36:52 +0200 Date: Mon, 02 Sep 2019 13:37:00 -0000 From: Jakub Jelinek To: Andrew Pinski Cc: Richard Biener , GCC Patches Subject: Re: [PATCH] Fix up go regressions caused by my recent switchconv changes (PR go/91617) Message-ID: <20190902133652.GP2120@tucnak> Reply-To: Jakub Jelinek References: <20190831131207.GF2120@tucnak> <20190831174117.GG2120@tucnak> <20190901163425.GK2120@tucnak> <20190902081421.GL2120@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00058.txt.bz2 On Mon, Sep 02, 2019 at 01:29:24AM -0700, Andrew Pinski wrote: > Seems like this would fix PR91632 also. > Which has a C testcase included. Indeed, I've committed the following after testing it with the patch reverted as well as with current trunk where it doesn't FAIL anymore. 2019-09-02 Jakub Jelinek PR tree-optimization/91632 * gcc.c-torture/execute/pr91632.c: New test. --- gcc/testsuite/gcc.c-torture/execute/pr91632.c.jj 2019-09-02 15:28:10.598774511 +0200 +++ gcc/testsuite/gcc.c-torture/execute/pr91632.c 2019-09-02 15:28:00.540925398 +0200 @@ -0,0 +1,30 @@ +/* PR tree-optimization/91632 */ +/* { dg-additional-options "-fwrapv" } */ + +static int +__attribute__((noipa)) +foo (char x) +{ + switch (x) + { + case '"': + case '<': + case '>': + case '\\': + case '^': + case '`': + case '{': + case '|': + case '}': + return 0; + } + return 1; +} + +int +main () +{ + if (foo ('h') == 0) + __builtin_abort (); + return 0; +} Jakub