convert.c (convert_to_integer): Don't instrument conversions if the function has...
authorMarek Polacek <polacek@redhat.com>
Mon, 30 Jun 2014 13:15:20 +0000 (13:15 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 30 Jun 2014 13:15:20 +0000 (13:15 +0000)
commit6a7253a4a9d6087827414eeee7036d9eb4b1e472
treed9fbba8c55ca2e01e66ea39234d507306dac9bed
parent670d96d7307b8cfa23000c050fe35c1298301cb4
convert.c (convert_to_integer): Don't instrument conversions if the function has no_sanitize_undefined attribute.

* convert.c (convert_to_integer): Don't instrument conversions if the
function has no_sanitize_undefined attribute.
* ubsan.c: Don't run the ubsan pass if the function has
no_sanitize_undefined attribute.
c/
* c-decl.c (grokdeclarator): Don't instrument VLAs if the function
has no_sanitize_undefined attribute.
cp/
* cp-gimplify.c (cp_genericize): Don't instrument returns if the
function has no_sanitize_undefined attribute.
* decl.c (compute_array_index_type): Don't instrument VLAs if the
function has no_sanitize_undefined attribute.
testsuite/
* c-c++-common/ubsan/attrib-2.c: New test.
* g++.dg/ubsan/return-3.C: New test.

From-SVN: r212148
gcc/ChangeLog
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/convert.c
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/attrib-2.c [new file with mode: 0644]
gcc/testsuite/g++.dg/ubsan/return-3.C [new file with mode: 0644]
gcc/ubsan.c