[PATCH PR c/71699] Handle pointer arithmetic in nonzero tree checks

Manish Goregaokar manish@mozilla.com
Thu Jun 30 16:13:00 GMT 2016


This is the full test failure summary. I will compare with the
previous commit tomorrow. The asan failure and the uninit-19 failure
are interesting. uninit-19 should not have failed, but I have no idea
what's going on with asan. I'll have a closer look tomorrow and look
for other failing tests.

cat <<'EOF' |
Native configuration is x86_64-apple-darwin15.3.0

        === g++ tests ===


Running target unix
FAIL: g++.dg/debug/dwarf2/imported-decl-2.C  -std=gnu++98
scan-assembler-times ascii "AAAA\\\\\\\\0".*ascii "BBBB\\\\\\\\0".*DIE
.0x[0-9a-f]*. DW_TAG_imported_declaration 1
FAIL: g++.dg/debug/dwarf2/imported-decl-2.C  -std=gnu++11
scan-assembler-times ascii "AAAA\\\\\\\\0".*ascii "BBBB\\\\\\\\0".*DIE
.0x[0-9a-f]*. DW_TAG_imported_declaration 1
FAIL: g++.dg/debug/dwarf2/imported-decl-2.C  -std=gnu++14
scan-assembler-times ascii "AAAA\\\\\\\\0".*ascii "BBBB\\\\\\\\0".*DIE
.0x[0-9a-f]*. DW_TAG_imported_declaration 1
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++11  (test for
errors, line 92)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++11  (test for
errors, line 93)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++11  (test for
errors, line 94)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++11  (test for
errors, line 95)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++11  (test for
errors, line 96)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++11  (test for
errors, line 98)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++11  (test for
errors, line 99)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++11  (test for
errors, line 100)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++11  (test for
errors, line 101)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++11  (test for
errors, line 102)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++14  (test for
errors, line 92)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++14  (test for
errors, line 93)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++14  (test for
errors, line 94)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++14  (test for
errors, line 95)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++14  (test for
errors, line 96)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++14  (test for
errors, line 98)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++14  (test for
errors, line 99)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++14  (test for
errors, line 100)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++14  (test for
errors, line 101)
FAIL: g++.dg/cpp0x/constexpr-array-ptr10.C  -std=c++14  (test for
errors, line 102)
FAIL: g++.dg/ext/sync-4.C  -std=gnu++98 execution test
FAIL: g++.dg/ext/sync-4.C  -std=gnu++11 execution test
FAIL: g++.dg/ext/sync-4.C  -std=gnu++14 execution test
FAIL: g++.dg/ipa/pr67056.C   scan-ipa-dump cp "Speculative outer
type:struct CompositeClass"
FAIL: c-c++-common/pr60226.c  -std=gnu++98 (test for excess errors)
FAIL: c-c++-common/pr60226.c  -std=gnu++11 (test for excess errors)
FAIL: c-c++-common/pr60226.c  -std=gnu++14 (test for excess errors)
FAIL: g++.dg/tree-prof/pr57451.C compilation,  -fprofile-generate
-D_PROFILE_GENERATE
UNRESOLVED: g++.dg/tree-prof/pr57451.C execution,
-fprofile-generate -D_PROFILE_GENERATE
UNRESOLVED: g++.dg/tree-prof/pr57451.C compilation,  -fprofile-use
-D_PROFILE_USE
UNRESOLVED: g++.dg/tree-prof/pr57451.C execution,    -fprofile-use
-D_PROFILE_USE
FAIL: g++.dg/tree-prof/pr63581.C compilation,  -fprofile-generate
-D_PROFILE_GENERATE
UNRESOLVED: g++.dg/tree-prof/pr63581.C execution,
-fprofile-generate -D_PROFILE_GENERATE
UNRESOLVED: g++.dg/tree-prof/pr63581.C compilation,  -fprofile-use
-D_PROFILE_USE
UNRESOLVED: g++.dg/tree-prof/pr63581.C execution,    -fprofile-use
-D_PROFILE_USE

        === g++ Summary ===

# of expected passes        98650
# of unexpected failures    32
# of expected failures        314
# of unresolved testcases    6
# of unsupported tests        4169
/Users/manishearth/dev/gcc-build/gcc/testsuite/g++/../../xg++  version
7.0.0 20160630 (experimental) (GCC)

        === gcc tests ===


Running target unix
FAIL: c-c++-common/asan/strncpy-overflow-1.c   -O0  execution test
FAIL: gcc.dg/debug/dwarf2/prod-options.c scan-assembler DW_AT_producer: "GNU C
FAIL: gcc.dg/darwin-minversion-1.c (test for excess errors)
FAIL: gcc.dg/darwin-minversion-2.c (test for excess errors)
FAIL: gcc.dg/darwin-version-1.c (test for excess errors)
FAIL: gcc.dg/framework-1.c (test for excess errors)
FAIL: gcc.dg/uninit-19.c  (test for warnings, line 22)
FAIL: gcc.dg/uninit-19.c (test for excess errors)
FAIL: c-c++-common/pr60226.c  -Wc++-compat  (test for excess errors)
FAIL: gcc.dg/graphite/scop-19.c scan-tree-dump-times graphite "number
of SCoPs: 0" 1
FAIL: gcc.dg/torture/pr68264.c   -O0  execution test
FAIL: gcc.dg/torture/pr68264.c   -O1  execution test
FAIL: gcc.dg/torture/pr68264.c   -O2  execution test
FAIL: gcc.dg/torture/pr68264.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr68264.c   -Os  execution test
FAIL: gcc.dg/tree-prof/crossmodule-indircall-1a.c compilation,
-fprofile-generate -D_PROFILE_GENERATE
UNRESOLVED: gcc.dg/tree-prof/crossmodule-indircall-1a.c execution,
-fprofile-generate -D_PROFILE_GENERATE
UNRESOLVED: gcc.dg/tree-prof/crossmodule-indircall-1a.c compilation,
-fprofile-use -D_PROFILE_USE
UNRESOLVED: gcc.dg/tree-prof/crossmodule-indircall-1a.c execution,
-fprofile-use -D_PROFILE_USE
FAIL: gcc.dg/tree-ssa/pr71077.c (test for excess errors)
FAIL: gcc.dg/tree-ssa/pr71347.c scan-tree-dump-not optimized ".* = MEM.*;"
FAIL: gcc.dg/tree-ssa/slsr-8.c scan-tree-dump-times optimized " w?\\\\* " 7
FAIL: gcc.target/i386/avx512f-vprord-1.c scan-assembler-times vprord[
\\\\t]+[^{\\n]*%zmm[0-9]+(?:\\n|[ \\\\t]+#) 1
FAIL: gcc.target/i386/avx512f-vprord-1.c scan-assembler-times vprord[
\\\\t]+[^{\\n]*%zmm[0-9]+{%k[1-7]}(?:\\n|[ \\\\t]+#) 1
FAIL: gcc.target/i386/avx512f-vprord-1.c scan-assembler-times vprord[
\\\\t]+[^{\\n]*%zmm[0-9]+{%k[1-7]}{z}(?:\\n|[ \\\\t]+#) 1
FAIL: gcc.target/i386/iinline-attr-2.c scan-assembler p2align
FAIL: gcc.target/i386/memcpy-strategy-3.c scan-assembler-times memcpy 2
FAIL: gcc.target/i386/memset-strategy-1.c scan-assembler-times memset 2
FAIL: gcc.target/i386/pr24414.c (test for excess errors)
UNRESOLVED: gcc.target/i386/pr24414.c compilation failed to produce executable
FAIL: gcc.target/i386/pr32219-1.c scan-assembler movl[
\\t]xxx\\\\(%rip\\\\), %eax
FAIL: gcc.target/i386/pr32219-3.c scan-assembler movl[
\\t]xxx\\\\(%rip\\\\), %eax
FAIL: gcc.target/i386/pr32219-3.c scan-assembler-not xxx@GOTPCREL
FAIL: gcc.target/i386/pr32219-5.c scan-assembler movl[
\\t]xxx\\\\(%rip\\\\), %eax
FAIL: gcc.target/i386/pr32219-6.c scan-assembler xxx@GOTPCREL
FAIL: gcc.target/i386/pr32219-7.c scan-assembler movl[
\\t]xxx\\\\(%rip\\\\), %eax
FAIL: gcc.target/i386/pr32219-7.c scan-assembler-not xxx@GOTPCREL
FAIL: gcc.target/i386/pr39013-1.c scan-assembler foo@PLT
FAIL: gcc.target/i386/pr39013-1.c scan-assembler bar@PLT
FAIL: gcc.target/i386/pr39013-2.c scan-assembler foo@PLT
FAIL: gcc.target/i386/pr39013-2.c scan-assembler bar@PLT
FAIL: gcc.target/i386/pr49866.c (test for excess errors)
FAIL: gcc.target/i386/pr61599-1.c (test for excess errors)
UNRESOLVED: gcc.target/i386/pr61599-1.c compilation failed to produce executable
FAIL: gcc.target/i386/pr63538.c scan-assembler movabs
FAIL: gcc.target/x86_64/abi/avx/test_m256_returning.c compilation,  -O0
UNRESOLVED: gcc.target/x86_64/abi/avx/test_m256_returning.c execution,  -O0
FAIL: gcc.target/x86_64/abi/avx/test_m256_returning.c compilation,  -O1
UNRESOLVED: gcc.target/x86_64/abi/avx/test_m256_returning.c execution,  -O1
FAIL: gcc.target/x86_64/abi/avx/test_m256_returning.c compilation,  -O2
UNRESOLVED: gcc.target/x86_64/abi/avx/test_m256_returning.c execution,  -O2
FAIL: gcc.target/x86_64/abi/avx/test_m256_returning.c compilation,  -O3 -g
UNRESOLVED: gcc.target/x86_64/abi/avx/test_m256_returning.c execution,  -O3 -g
FAIL: gcc.target/x86_64/abi/avx/test_m256_returning.c compilation,  -Os
UNRESOLVED: gcc.target/x86_64/abi/avx/test_m256_returning.c execution,  -Os
FAIL: gcc.target/x86_64/abi/avx/test_m256_returning.c compilation,  -Og -g
UNRESOLVED: gcc.target/x86_64/abi/avx/test_m256_returning.c execution,  -Og -g
FAIL: gcc.target/x86_64/abi/avx/test_passing_m256.c compilation,  -O0
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_m256.c execution,  -O0
FAIL: gcc.target/x86_64/abi/avx/test_passing_m256.c compilation,  -O1
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_m256.c execution,  -O1
FAIL: gcc.target/x86_64/abi/avx/test_passing_m256.c compilation,  -O2
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_m256.c execution,  -O2
FAIL: gcc.target/x86_64/abi/avx/test_passing_m256.c compilation,  -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_m256.c execution,
-O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions
FAIL: gcc.target/x86_64/abi/avx/test_passing_m256.c compilation,  -O3 -g
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_m256.c execution,  -O3 -g
FAIL: gcc.target/x86_64/abi/avx/test_passing_m256.c compilation,  -Os
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_m256.c execution,  -Os
FAIL: gcc.target/x86_64/abi/avx/test_passing_m256.c compilation,  -Og -g
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_m256.c execution,  -Og -g
FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c compilation,  -O0
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_structs.c execution,  -O0
FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c compilation,  -O1
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_structs.c execution,  -O1
FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c compilation,  -O2
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_structs.c execution,  -O2
FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c compilation,
-O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_structs.c
execution,  -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops
-ftracer -finline-functions
FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c compilation,  -O3 -g
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_structs.c execution,  -O3 -g
FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c compilation,  -Os
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_structs.c execution,  -Os
FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c compilation,  -Og -g
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_structs.c execution,  -Og -g
FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c compilation,  -O0
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_unions.c execution,  -O0
FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c compilation,  -O1
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_unions.c execution,  -O1
FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c compilation,  -O2
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_unions.c execution,  -O2
FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c compilation,
-O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_unions.c execution,
 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer
-finline-functions
FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c compilation,  -O3 -g
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_unions.c execution,  -O3 -g
FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c compilation,  -Os
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_unions.c execution,  -Os
FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c compilation,  -Og -g
UNRESOLVED: gcc.target/x86_64/abi/avx/test_passing_unions.c execution,  -Og -g

        === gcc Summary ===

# of expected passes        91865
# of unexpected failures    67
# of expected failures        242
# of unresolved testcases    32
# of unsupported tests        2893
/Users/manishearth/dev/gcc-build/gcc/xgcc  version 7.0.0 20160630
(experimental) (GCC)


Compiler version: 7.0.0 20160630 (experimental) (GCC)
Platform: x86_64-apple-darwin15.3.0
configure flags: --prefix=/Users/manishearth/dev/gcc-install
--disable-bootstrap --enable-languages=c,c++
EOF
Mail -s "Results for 7.0.0 20160630 (experimental) (GCC) testsuite on
x86_64-apple-darwin15.3.0" gcc-testresults@gcc.gnu.org &&
mv /Users/manishearth/dev/gcc-build/./gcc/testsuite/g++/g++.sum
/Users/manishearth/dev/gcc-build/./gcc/testsuite/g++/g++.sum.sent &&
mv /Users/manishearth/dev/gcc-build/./gcc/testsuite/gcc/gcc.sum
/Users/manishearth/dev/gcc-build/./gcc/testsuite/gcc/gcc.sum.sent &&
mv /Users/manishearth/dev/gcc-build/./gcc/testsuite/g++/g++.log
/Users/manishearth/dev/gcc-build/./gcc/testsuite/g++/g++.log.sent &&
mv /Users/manishearth/dev/gcc-build/./gcc/testsuite/gcc/gcc.log
/Users/manishearth/dev/gcc-build/./gcc/testsuite/gcc/gcc.log.sent &&
true



-Manish


On Thu, Jun 30, 2016 at 8:44 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
> On Thu, 30 Jun 2016, Richard Biener wrote:
>
>> points-to analysis already has the constraint that POINTER_PLUS_EXPR
>> cannot leave the object op0 points to.  Of course currently nothing uses the
>> fact whether points-to computes pointed-to as nothing (aka NULL) - so the
>> argument may be moot.
>>
>> Anyway, one of my points to the original patch was that POINTER_PLUS_EXPR
>> handling should be clearly separate from PLUS_EXPR and that we have
>> flag_delete_null_pointer_checks to allow targest to declare that 0 is a
>> valid
>> object pointer (and thus you can do 4 + -4 and reach NULL).
>
>
> Thanks. So the tricky point is that we are not allowed to transform g into f
> below:
>
> char*f(char*p){return p+4;}
> char*g(char*p){return (char*)((intptr_t)p+4);}
>
> That makes sense and seems much easier to guarantee than I feared, nice.
>
> (on the other hand, only RTL is able to simplify (long)p+4-(long)(p+4))
>
> --
> Marc Glisse



More information about the Gcc-patches mailing list