This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strenghten assumption about dynamic type changes (placement new)


Jan Hubicka <hubicka@ucw.cz> writes:

> 	* cgraph.c (cgraph_create_indirect_edge): Update call of
> 	get_polymorphic_call_info.
> 	* ipa-utils.h (get_polymorphic_call_info): Add parameter CALL.
> 	(possible_polymorphic_call_targets): Add parameter call.
> 	(decl_maybe_in_construction_p): New predicate.
> 	(get_polymorphic_call_info): Add parameter call;
> 	use decl_maybe_in_construction_p.
> 	* gimple-fold.c (fold_gimple_assign): Update use of
> 	possible_polymorphic_call_targets.
> 	(gimple_fold_call): Likewise.
> 	* ipa-prop.c: Inlcude calls.h
> 	(ipa_binfo_from_known_type_jfunc): Check that known type is record.
> 	(param_type_may_change_p): New predicate.
> 	(detect_type_change_from_memory_writes): Break out from ...
> 	(detect_type_change): ... this one; use 
> 	param_type_may_change_p.
> 	(detect_type_change_ssa): Use param_type_may_change_p.
> 	(compute_known_type_jump_func): Use decl_maybe_in_construction_p.

This breaks g++.dg/ipa/pr61085.C on ia64.

(gdb) bt
#0  0xa000000000040721 in __kernel_syscall_via_break ()
#1  0x20000000004331d0 in *__GI_raise (sig=<optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:67
#2  0x2000000000435ab0 in *__GI_abort () at abort.c:92
#3  0x40000000000009e0 in C::m_virt (this=0x4000000000000760 <main()+96>)
    at /usr/local/gcc/gcc-20140707/gcc/testsuite/g++.dg/ipa/pr61085.C:26
#4  0x4000000000000760 in m_foo (this=0x600ffffffffeee40)
    at /usr/local/gcc/gcc-20140707/gcc/testsuite/g++.dg/ipa/pr61085.C:20
#5  ~B (__vtt_parm=<optimized out>, this=0x600ffffffffeee40, 
    __in_chrg=<optimized out>)
    at /usr/local/gcc/gcc-20140707/gcc/testsuite/g++.dg/ipa/pr61085.C:14
#6  ~C (this=0x600ffffffffeee40, __in_chrg=<optimized out>, 
    __vtt_parm=<optimized out>)
    at /usr/local/gcc/gcc-20140707/gcc/testsuite/g++.dg/ipa/pr61085.C:24
#7  main ()
    at /usr/local/gcc/gcc-20140707/gcc/testsuite/g++.dg/ipa/pr61085.C:32

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]