00 2001
> From: Martin Liska
> Date: Mon, 17 Jun 2019 10:39:15 +0200
> Subject: [PATCH] Handle '\0' in strcmp in RTL expansion (PR
> tree-optimization/90892).
>
> gcc/ChangeLog:
>
> 2019-06-17 Martin Liska
>
> PR tree-optimization/90892
> *
n testing the patch.
Ready to be installed then?
Thanks,
Martin
>From 35043ab431c0dc1e8dcda484725a1f8875a4b95b Mon Sep 17 00:00:00 2001
From: Martin Liska
Date: Mon, 17 Jun 2019 10:39:15 +0200
Subject: [PATCH] Handle '\0' in strcmp in RTL expansion (PR
tree-optimization/90892).
gcc/ChangeLog:
On 6/18/19 11:56 AM, Martin Liška wrote:
> On 6/18/19 10:23 AM, Martin Liška wrote:
>> On 6/18/19 10:11 AM, Jakub Jelinek wrote:
>>> On Tue, Jun 18, 2019 at 10:07:50AM +0200, Martin Liška wrote:
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 3463ffb1539..b58e1e58d4d 100644
---
On 6/18/19 12:33 PM, Jakub Jelinek wrote:
> On Tue, Jun 18, 2019 at 12:27:31PM +0200, Martin Liška wrote:
>>> Oops. The problematic case is then if the STRING_CST c_getstr finds
>>> is not NUL terminated (dunno if we ever construct that) or if
>>> string_size is smaller than string_length and
On Tue, Jun 18, 2019 at 12:27:31PM +0200, Martin Liška wrote:
> > Oops. The problematic case is then if the STRING_CST c_getstr finds
> > is not NUL terminated (dunno if we ever construct that) or if
> > string_size is smaller than string_length and there are no NULs in that
> > size.
>
> The
gt;>
>>> Martin
>>>
>>
>> Ok, there's an off-by-one error in the previous patch candidate.
>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>
>> Ready to be installed?
>> Thanks,
>> Martin
>
>> >
1 != NULL)
> >> len1 = strnlen (src_str1, len1);
> >>
> >>Jakub
> >>
> >
> > Got it, I'm testing that.
> >
> > Martin
> >
>
> Ok, there's an off-by-one error in the previous patch candidate.
> Patch can boots
.
>
> Martin
>
Ok, there's an off-by-one error in the previous patch candidate.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
Ready to be installed?
Thanks,
Martin
>From fe4ef7d43c506f450de802a7d8a602fab7da4545 Mon Sep 17 00:00:00 2001
From: Martin Liska
Date: Mon, 17 Jun 2019 10:39:15 +02
; if (src_str1 != NULL)
> len1 = strnlen (src_str1, len1);
>
> Jakub
>
Got it, I'm testing that.
Martin
>From 5450be93ace37d93e700cb077aebe628a9fe0a0e Mon Sep 17 00:00:00 2001
From: Martin Liska
Date: Mon, 17 Jun 2019 10:39:15 +0200
Subject: [PATCH] Handle '\0' in strcmp
On Tue, Jun 18, 2019 at 10:07:50AM +0200, Martin Liška wrote:
> diff --git a/gcc/builtins.c b/gcc/builtins.c
> index 3463ffb1539..b58e1e58d4d 100644
> --- a/gcc/builtins.c
> +++ b/gcc/builtins.c
> @@ -7142,6 +7142,20 @@ inline_expand_builtin_string_cmp (tree exp, rtx target)
>const char
nux-gnu and survives regression tests.
Ready to be installed?
Thanks,
Martin
>
> Jakub
>
>From d3bb4fc58dc92057bdb3e0921d6c0ffce1e8d732 Mon Sep 17 00:00:00 2001
From: Martin Liska
Date: Mon, 17 Jun 2019 10:39:15 +0200
Subject: [PATCH] Handle '\0' in strcmp in RTL expansion
On Mon, Jun 17, 2019 at 11:26:03AM +0200, Martin Liška wrote:
> diff --git a/gcc/builtins.c b/gcc/builtins.c
> index 3463ffb1539..917852071b9 100644
> --- a/gcc/builtins.c
> +++ b/gcc/builtins.c
> @@ -7142,6 +7142,20 @@ inline_expand_builtin_string_cmp (tree exp, rtx target)
>const char
Hi.
The function c_getstr returns string and length of the string.
In inline_expand_builtin_string_cmp, we should consider situations
where a string constant contains a zero character. In that case
we have to shorten len[12].
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
13 matches
Mail list logo