From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48926 invoked by alias); 13 Dec 2018 12:37:54 -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 48908 invoked by uid 89); 13 Dec 2018 12:37:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Dec 2018 12:37:52 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id wBDCblaW007741; Thu, 13 Dec 2018 06:37:48 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id wBDCbeUZ007729; Thu, 13 Dec 2018 06:37:41 -0600 Date: Thu, 13 Dec 2018 12:37:00 -0000 From: Segher Boessenkool To: Jakub Jelinek Cc: Jeff Law , gcc-patches Subject: Re: [PATCH] Fix split-path-5.c testcase (PR testsuite/88454) Message-ID: <20181213123739.GC3803@gate.crashing.org> References: <2bac4239-d7ef-7555-a362-cfddc6bde931@redhat.com> <20181213074953.GR12380@tucnak> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181213074953.GR12380@tucnak> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00923.txt.bz2 On Thu, Dec 13, 2018 at 08:49:53AM +0100, Jakub Jelinek wrote: > On Mon, Dec 10, 2018 at 09:56:46PM -0700, Jeff Law wrote: > > Note that split-path-5 has the same basic structure. A half-diamond > > with a single statement in the middle block that should be trivially > > if-convertable if profitable. So I adjusted that testcase. > > The split-path-5.c testcase now fails on powerpc64*, arm*, aarch64* etc. > targets. > > When looking for the difference, I found out it is a -fsigned-char vs. > -funsigned-char issue, on -funsigned-char targets we are simply compiling > something quite different. Ha :-) > The following patch fixes it, regtested on x86_64-linux (-m64/-m32) and > tested with cross to aarch64-linux and powerpc64-linux. Ok for trunk? This is an obvious patch, isn't it :-) Segher > 2018-12-13 Jakub Jelinek > > PR testsuite/88454 > * gcc.dg/tree-ssa/split-path-5.c (__ctype_ptr__): Change type from > const char * to const signed char *. > (bmhi_init): Change pattern parameter's type the same. Use > __builtin_strlen instead of undeclared strlen. > > --- gcc/testsuite/gcc.dg/tree-ssa/split-path-5.c.jj 2018-12-11 11:02:09.003065907 +0100 > +++ gcc/testsuite/gcc.dg/tree-ssa/split-path-5.c 2018-12-13 08:36:26.457533278 +0100 > @@ -1,16 +1,16 @@ > /* { dg-do compile } */ > /* { dg-options "-O2 -fsplit-paths -fdump-tree-split-paths-details -w" } */ > > -const extern char *__ctype_ptr__; > +const extern signed char *__ctype_ptr__; > typedef unsigned char uchar; > static int patlen; > static int skip[(0x7f * 2 + 1) + 1]; > static uchar *pat = ((void *) 0); > void > -bmhi_init (const char *pattern) > +bmhi_init (const signed char *pattern) > { > int i, lastpatchar; > - patlen = strlen (pattern); > + patlen = __builtin_strlen (pattern); > for (i = 0; i < patlen; i++) > pat[i] = ( > {