https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92144

            Bug ID: 92144
           Summary: [10 regression] c-c++-common/Warray-bounds-4.c still
                    fails after r277080
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

This test is still failing at least sometimes on powerpc64 (re: remove XFAIL):

make -k check-gcc RUNTESTFLAGS=dg.exp=c-c++-common/Warray-bounds-4.c
...
FAIL: c-c++-common/Warray-bounds-4.c  -Wc++-compat  strcpy (test for warnings,
line 66)
FAIL: c-c++-common/Warray-bounds-4.c  -std=gnu++98 strcpy (test for warnings,
line 66)
FAIL: c-c++-common/Warray-bounds-4.c  -std=gnu++14 strcpy (test for warnings,
line 66)
FAIL: c-c++-common/Warray-bounds-4.c  -std=gnu++17 strcpy (test for warnings,
line 66)
FAIL: c-c++-common/Warray-bounds-4.c  -std=gnu++2a strcpy (test for warnings,
line 66)
...
# of expected passes            3
# of expected passes            12
# of unexpected failures        1
# of expected failures          1
# of unexpected failures        4
# of expected failures          4


One example:


Executing on host: /home/seurer/gcc/build/gcc-test2/gcc/xgcc
-B/home/seurer/gcc/build/gcc-test2/gcc/
/home/seurer/gcc/gcc-test2/gcc/testsuite/c-c++-common/Warray-bounds-4.c   
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never  -fdiagnostics-urls=never   -Wc++-compat  -O2
-Warray-bounds=2 -Wno-stringop-overflow -ftrack-macro-expansion=0 -S -o
Warray-bounds-4.s    (timeout = 300)
spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-test2/gcc/xgcc
-B/home/seurer/gcc/build/gcc-test2/gcc/
/home/seurer/gcc/gcc-test2/gcc/testsuite/c-c++-common/Warray-bounds-4.c
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never -fdiagnostics-urls=never -Wc++-compat -O2
-Warray-bounds=2 -Wno-stringop-overflow -ftrack-macro-expansion=0 -S -o
Warray-bounds-4.s
/home/seurer/gcc/gcc-test2/gcc/testsuite/c-c++-common/Warray-bounds-4.c: In
function 'test_memcpy_bounds_memarray_range':
/home/seurer/gcc/gcc-test2/gcc/testsuite/c-c++-common/Warray-bounds-4.c:47:3:
warning: 'memcpy' offset [5, 7] from the object at 'ma' is out of the bounds of
referenced subobject 'a5' with type 'char[5]' at offset 0 [-Warray-bounds]
/home/seurer/gcc/gcc-test2/gcc/testsuite/c-c++-common/Warray-bounds-4.c:27:18:
note: subobject 'a5' declared here
/home/seurer/gcc/gcc-test2/gcc/testsuite/c-c++-common/Warray-bounds-4.c:48:3:
warning: 'memcpy' offset [5, 9] from the object at 'ma' is out of the bounds of
referenced subobject 'a5' with type 'char[5]' at offset 0 [-Warray-bounds]
/home/seurer/gcc/gcc-test2/gcc/testsuite/c-c++-common/Warray-bounds-4.c:27:18:
note: subobject 'a5' declared here
PASS: c-c++-common/Warray-bounds-4.c  -Wc++-compat   (test for warnings, line
47)
PASS: c-c++-common/Warray-bounds-4.c  -Wc++-compat   (test for warnings, line
48)
FAIL: c-c++-common/Warray-bounds-4.c  -Wc++-compat  strcpy (test for warnings,
line 66)
XFAIL: c-c++-common/Warray-bounds-4.c  -Wc++-compat  strcpy (test for warnings,
line 70)
PASS: c-c++-common/Warray-bounds-4.c  -Wc++-compat  (test for excess errors)



------------------------------------------------------------------------
r277080 | msebor | 2019-10-16 14:24:36 -0500 (Wed, 16 Oct 2019) | 24 lines

PR tree-optimization/83821 - local aggregate initialization defeats strlen
optimization

gcc/ChangeLog:

        PR tree-optimization/83821
        * tree-ssa-strlen.c (maybe_invalidate): Add argument.  Consider
        the length of a string when available.
        (handle_builtin_memset) Add argument.
        (handle_store, strlen_check_and_optimize_call): Same.
        (check_and_optimize_stmt): Same.  Pass it to callees.

gcc/testsuite/ChangeLog:

        PR tree-optimization/83821
        * c-c++-common/Warray-bounds-4.c: Remove XFAIL.
        * gcc.dg/strlenopt-82.c: New test.
        * gcc.dg/strlenopt-83.c: Same.
        * gcc.dg/strlenopt-84.c: Same.
        * gcc.dg/strlenopt-85.c: Same.
        * gcc.dg/strlenopt-86.c: Same.
        * gcc.dg/tree-ssa/calloc-4.c: Same.
        * gcc.dg/tree-ssa/calloc-5.c: Same.

Reply via email to