From: Jakub Jelinek <jakub@redhat.com>
To: Jeff Law <law@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH] Fix split-path-5.c testcase (PR testsuite/88454)
Date: Thu, 13 Dec 2018 07:50:00 -0000 [thread overview]
Message-ID: <20181213074953.GR12380@tucnak> (raw)
In-Reply-To: <2bac4239-d7ef-7555-a362-cfddc6bde931@redhat.com>
Hi!
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.
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?
2018-12-13 Jakub Jelinek <jakub@redhat.com>
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] = (
{
Jakub
next prev parent reply other threads:[~2018-12-13 7:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 4:56 [committed] [PR tree-optimization/80520] Throttle path splitting slightly Jeff Law
2018-12-11 8:30 ` Richard Biener
2018-12-11 17:15 ` [PATCH] Fix up split-path-11.c testcase (Re: [committed] [PR tree-optimization/80520] Throttle path splitting slightly.) Jakub Jelinek
2018-12-11 19:06 ` Jeff Law
2018-12-13 7:50 ` Jakub Jelinek [this message]
2018-12-13 12:37 ` [PATCH] Fix split-path-5.c testcase (PR testsuite/88454) Segher Boessenkool
2018-12-13 18:46 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181213074953.GR12380@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).