On 08/28/18 11:25, Bernd Edlinger wrote:
> On 08/28/18 04:55, Jeff Law wrote:
>> On 08/23/2018 08:48 AM, Bernd Edlinger wrote:
>>> On 08/23/18 16:24, Jeff Law wrote:
>>>>>
>>>>> Yes, and which one was the earlier, more controversial patch from me?
>>>>
>>>> https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01800.html
>>>>
>>>>
>>>> Which is the issue I'm working through right now :-)
>>>>
>>>
>>> Okay, please note that a re-based patch is here:
>>>
>>> https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01005.html
>>>
>>> and if you want, you can split that patch in two parts:
>>>
>>> first:
>>> 86711 fix:
>>> 2018-08-17  Bernd Edlinger  <bernd.edlin...@hotmail.de>
>>>
>>>           PR middle-end/86711
>>>           * expr.c (string_constant): Don't return truncated string 
>>> literals.
>>>
>>>           * gcc.c-torture/execute/pr86711.c: New test.
>> Note that while this fixes your pr86711.c, it doesn't fix the larger set
>> of tests Martin has created for the issues in pr86711.
>>
>> Sigh.
>> jeff
>>
> 
> 
> Hmm.  which test do you mean?
> 
> I just looked at the tests from part1/6.
> 
> there I found test cases memchr-1.c, pr86714.c, strlenopt-56.c
> 
> test them against trunk from yesterday (only build stage1):
> $ svn info
> Path: .
> Working Copy Root Path: /home/ed/gnu/gcc-trunk
> URL: svn+ssh://edlin...@gcc.gnu.org/svn/gcc/trunk
> Relative URL: ^/trunk
> Repository Root: svn+ssh://edlin...@gcc.gnu.org/svn/gcc
> Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4
> Revision: 263893
> Node Kind: directory
> Schedule: normal
> Last Changed Author: jakub
> Last Changed Rev: 263891
> Last Changed Date: 2018-08-27 20:36:23 +0200 (Mon, 27 Aug 2018)
> 
> memchr-1.c fail
> pr86714.c fail
> strlenopt-56.c pass
> 
> I don't know what this test case is trying to test, sorry.
> What is obvious about it:
> 
> static const wchar_t wsx[] = L"\x12345678";
> static const wchar_t ws4[] = L"\x00123456\x12005678\x12340078\x12345600";
> 
> This will be one more failed test case on AIX, given it uses -Wall.
> 
> Now I apply my pr86711 patch (only expr.c changed):
> 
> result
> memchr-1.c pass
> pr86714.c pass
> 

Wow, wait a moment.

When I wrote this: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01089.html
with the original test results of the pr86711 patch I wrote:

"This time I attach the test results for your reference:
gcc-trunk-263644-test.txt: unchanged r263644
gcc-trunk-263644-0-test.txt: r263644 + this patch
gcc-trunk-263644-1-test.txt: r263644 + this patch without string_constant"

"this patch" means both parts,
"this patch without string_constant" means only fold-const.c changed.
string_constant is in expr.c.

I have mis-remembered that, deeply sorry about it.


So I try it the other way round:

apply pr86711 patch (only fold-const.c/h changed):

memchr-1.c pass
pr86714.c fail
strlenop-56.c pass (which probably disqualifies that test case)

So this would have been the correct changelog:

2018-08-17  Bernd Edlinger  <bernd.edlin...@hotmail.de>

         PR middle-end/86711
         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
         argument.  Fix range checks.
         * fold-const.h (c_getstr): Adjust prototype.

         * gcc.c-torture/execute/pr86711.c: New test.



Bernd.

Reply via email to