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


Reply via email to