]> gcc.gnu.org Git - gcc.git/commit - gcc/cp/cp-tree.h
re PR c++/68508 (Internal compiler error with parentheses around return value in...
authorJakub Jelinek <jakub@redhat.com>
Thu, 26 Nov 2015 09:52:48 +0000 (10:52 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 26 Nov 2015 09:52:48 +0000 (10:52 +0100)
commit62775f0d9a513654b62e8a83e13c8d1324635ee4
treea5817c2d93ec5378d7f944232b39f405296aa94f
parentbf8e1b52f72d079d99173a6742f0070c632cc736
re PR c++/68508 (Internal compiler error with parentheses around return value in C++14 with ASan enabled)

PR c++/68508
* cp-tree.h (cp_ubsan_maybe_instrument_downcast): Add INTYPE argument.
* cp-ubsan.c (cp_ubsan_maybe_instrument_downcast): Likewise.  Use
it instead of or in addition to TREE_TYPE (op).  Use
is_properly_derived_from, return NULL_TREE if TREE_TYPE (intype) and
TREE_TYPE (type) are the same type minus qualifiers.
* typeck.c (build_static_cast_1): Adjust callers.

* g++.dg/ubsan/pr68508.C: New test.

From-SVN: r230928
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/cp-ubsan.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ubsan/pr68508.C [new file with mode: 0644]
This page took 0.059908 seconds and 5 git commands to generate.