From: Martin Sebor <msebor@gmail.com>
To: Siddhesh Poyarekar <siddhesh@gotplt.org>,
Gcc Patch List <gcc-patches@gcc.gnu.org>,
Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH] correct -Wrestrict handling of arrays of arrays (PR 84095)
Date: Fri, 23 Feb 2018 15:52:00 -0000 [thread overview]
Message-ID: <ed293e7f-a4b7-1dc0-0f16-b3f5599dd98d@gmail.com> (raw)
In-Reply-To: <d638aa6e-3846-7482-be1e-d76667ddc0eb@gotplt.org>
On 02/22/2018 08:17 PM, Siddhesh Poyarekar wrote:
> On Friday 02 February 2018 05:15 AM, Martin Sebor wrote:
>> PR middle-end/84095 - false-positive -Wrestrict warnings for memcpy within array
>>
>> gcc/ChangeLog:
>>
>> PR middle-end/84095
>> * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
>> (builtin_memref::set_base_and_offset): Same. Handle inner references.
>> (builtin_memref::builtin_memref): Factor out parts into
>> set_base_and_offset and call it.
>>
>> gcc/testsuite/ChangeLog:
>>
>> PR middle-end/84095
>> * c-c++-common/Warray-bounds-3.c: Adjust text of expected warnings.
>> * c-c++-common/Wrestrict.c: Same.
>> * gcc.dg/Wrestrict-6.c: Same.
>> * gcc.dg/Warray-bounds-27.c: New test.
>> * gcc.dg/Wrestrict-8.c: New test.
>> * gcc.dg/Wrestrict-9.c: New test.
>> * gcc.dg/pr84095.c: New test.
>
> This is causing failures in Warray-bounds-2.c in the testsuite:
>
> FAIL: c-c++-common/Warray-bounds-2.c -Wc++-compat memcpy (test for
> warnings, line 67)
I see no failures in this test in any of the recently reported
results on any targets except those below:
https://gcc.gnu.org/ml/gcc-testresults/2018-02/msg01530.html
https://gcc.gnu.org/ml/gcc-testresults/2018-02/msg01514.html
There are a large number of failures in these reports in many
tests that were reported previously (before r257910), suggesting
something else is wrong. They all seem to use -fpic.
If you referring to some other report or your own result please
post a link or say what target/configuration, etc..
Martin
> FAIL: c-c++-common/Warray-bounds-2.c -Wc++-compat (test for warnings,
> line 72)
> FAIL: c-c++-common/Warray-bounds-2.c -Wc++-compat strncpy (test for
> warnings, line 178)
> FAIL: c-c++-common/Warray-bounds-2.c -Wc++-compat (test for warnings,
> line 183)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++98 memcpy (test for
> warnings, line 67)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++98 (test for warnings,
> line 72)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++98 strncpy (test for
> warnings, line 178)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++98 (test for warnings,
> line 183)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++11 memcpy (test for
> warnings, line 67)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++11 (test for warnings,
> line 72)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++11 strncpy (test for
> warnings, line 178)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++11 (test for warnings,
> line 183)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++14 memcpy (test for
> warnings, line 67)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++14 (test for warnings,
> line 72)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++14 strncpy (test for
> warnings, line 178)
> FAIL: c-c++-common/Warray-bounds-2.c -std=gnu++14 (test for warnings,
> line 183)
>
> Siddhesh
>
next prev parent reply other threads:[~2018-02-23 15:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 23:37 Martin Sebor
2018-02-01 23:45 ` Martin Sebor
2018-02-09 2:46 ` Martin Sebor
2018-02-14 6:14 ` Jeff Law
2018-02-15 17:48 ` Martin Sebor
2018-02-16 23:39 ` Jeff Law
2018-02-23 3:17 ` Siddhesh Poyarekar
2018-02-23 15:52 ` Martin Sebor [this message]
2018-02-23 16:19 ` Siddhesh Poyarekar
2018-02-23 16:49 ` Jakub Jelinek
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=ed293e7f-a4b7-1dc0-0f16-b3f5599dd98d@gmail.com \
--to=msebor@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=siddhesh@gotplt.org \
/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).