PR ipa/60854
	* ipa.c (symtab_remove_unreachable_nodes): Mark targets of
	external aliases alive, too.
	* g++.dg/torture/pr60854.C: New testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209459 138bc75d-0d04-0410-961f-82ee72b054a4
	PR lto/60820
	* gcc.dg/lto/pr60820_0.c: New testcase.
	* gcc.dg/lto/pr60820_1.c: New testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209460 138bc75d-0d04-0410-961f-82ee72b054a4
	* ipa-devirt.c (odr_type_d): Add field all_derivations_known.
	(type_all_derivations_known_p): New predicate.
	(type_all_ctors_visible_p): New predicate.
	(type_possibly_instantiated_p): New predicate.
	(get_odr_type): Compute all_derivations_known.
	(dump_odr_type): Dump the flag.
	(maybe_record_type): Cleanup.
	(record_target_from_binfo): Add bases_to_consider array;
	record bases for types w/o instances and skip CXX destructor.
	(possible_polymorphic_call_targets_1): Add bases_to_consider
	and consider_construction parameters; check if type may
	have instance.
	(get_polymorphic_call_info): Set maybe_in_construction to true
	when we know nothing.
	(record_targets_from_bases): Skip CXX destructors; they are
	never called for types in construction.
	(possible_polymorphic_call_targets): Do not record target when
	type may not have instance.

	* g++.dg/ipa/devirt-31.C: New testcase.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209461 138bc75d-0d04-0410-961f-82ee72b054a4