re PR sanitizer/81604 (Ubsan type reporting can be bogus in some cases)
authorJakub Jelinek <jakub@redhat.com>
Mon, 31 Jul 2017 08:24:58 +0000 (10:24 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 31 Jul 2017 08:24:58 +0000 (10:24 +0200)
commit066bbc5721fbda2affe061fc4025a622bf30d5b5
treef6856056cea7ca4d38b1682f111a0f33dddb0a52
parent0d1e5925e46184273f930aa45f1ec4f87752998b
re PR sanitizer/81604 (Ubsan type reporting can be bogus in some cases)

PR sanitizer/81604
* ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
change type to the element type, instead add eltype variable and
use it where we are interested in the element type.

* c-c++-common/ubsan/pr81604.c: New test.

From-SVN: r250728
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/pr81604.c [new file with mode: 0644]
gcc/ubsan.c