Handle instrumented expr for unsigned-integer-overflow 77/214277/4
authorMikhail Kashkarov <m.kashkarov@partner.samsung.com>
Thu, 19 Sep 2019 13:29:10 +0000 (16:29 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Wed, 25 Sep 2019 03:50:32 +0000 (03:50 +0000)
commit267b63546a637da74bc7f024ebdc2ce76d353de8
tree112d02aa3f069e22f74128f1ac7769adab92c677
parent316d5c2986eec03e2ffea99f9facfb3dcb60dee7
Handle instrumented expr for unsigned-integer-overflow

2019-09-19  Mikhail Kashkarov  <m.kashkarov@partner.samsung.com>
    c-family/
* c-ubsan.c (ubsan_compound_instrumented_expr_p): New function.
* c-ubsan.h (ubsan_compound_instrumented_expr_p): New prototype.

    c/
* c-typeck.c (build_binary_op): Handle instrumented expr for
SANITIZE_UI_OVERFLOW.

    cp/
* typeck.c (cp_build_binary_op): Same.

    testsuite/
* c-c++-common/isan/invalid-ui-oveflow-1.c: New testcase.

Change-Id: I8e0fbf443da866bf8756d848fd7bf2ab7e858f06
gcc/c-family/c-ubsan.c
gcc/c-family/c-ubsan.h
gcc/c/c-typeck.c
gcc/cp/typeck.c
gcc/testsuite/c-c++-common/isan/invalid-ui-oveflow-1.c [new file with mode: 0644]