re PR ipa/65610 (Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize...
authorJakub Jelinek <jakub@redhat.com>
Mon, 30 Mar 2015 21:56:02 +0000 (23:56 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 30 Mar 2015 21:56:02 +0000 (23:56 +0200)
commit00a0ea64eec42da418a111bb4585b2ea007358dc
tree4a2145b3fd570aa231e78ea5f2d8819866f798a9
parentef4bac7802534e52d3031dccf0cdfb2c53b2d836
re PR ipa/65610 (Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3)

PR ipa/65610
* ipa-utils.h (inlined_polymorphic_ctor_dtor_block_p): Declare.
* ipa-polymorphic-call.c (inlined_polymorphic_ctor_dtor_block_p): New
function.
(decl_maybe_in_construction_p, noncall_stmt_may_be_vtbl_ptr_store):
Use it.
* ipa-prop.c (param_type_may_change_p): Likewise.
* tree-ssa-live.c: Include ipa-utils.h and its dependencies.
(remove_unused_scope_block_p): Add in_ctor_dtor_block
argument.  Before inlining, preserve
inlined_polymorphic_ctor_dtor_block_p blocks and the outermost block
with FUNCTION_DECL BLOCK_ABSTRACT_ORIGIN inside of them.  Adjust
recursive calls.
(remove_unused_locals): Adjust remove_unused_scope_block_p caller.

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

From-SVN: r221781
gcc/ChangeLog
gcc/ipa-polymorphic-call.c
gcc/ipa-prop.c
gcc/ipa-utils.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ubsan/pr65610.C [new file with mode: 0644]
gcc/tree-ssa-live.c