diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-16 23:18:29 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-16 23:18:29 +0000 |
commit | 40175f70b0e3a6ecc82cd5601ec12c49b1f5b354 (patch) | |
tree | 50d7960821ec80bd6136c7a2e9106406f64e8633 /gcc/ipa-utils.h | |
parent | 17223f318bbd597b8bf71b8bd3cbbdd8ee3773ea (diff) | |
download | gcc-40175f70b0e3a6ecc82cd5601ec12c49b1f5b354.tar.gz |
* ipa-utils.h (warn_types_mismatch, odr_or_derived_type_p,
odr_types_equivalent_p): Declare.
(odr_type_p): Use gcc_checking_assert.
(type_in_anonymous_namespace_p) Declare.
(type_with_linkage_p): Declare.
* common.opt (Wlto-type-mismatch): New warning.
* ipa-devirt.c (compound_type_base): New function.
(odr_or_derived_type_p): New function.
(odr_types_equivalent_p): New function.
(add_type_duplicate): Simplify.
(type_with_linkage_p): Add hack to prevent false positives on C types
(type_in_anonymous_namespace_p): Likewise.
* tree.c (need_assembler_name_p): Use type_with_linkage.
* tree.h (type_in_anonymous_namespace_p): Remove.
* doc/invoke.texi (-Wlto-type-mismatch): Document
* lto-symtab.c (warn_type_compatibility_p): Break out from ...;
compare ODR types (if available) and function types.
(lto_symtab_merge): ... here; output ODR violation warnings
and call warn_types_mismatch.
* gfortran.dg/lto/20091028-2_1.c: Fix return value.
* gfortran.dg/lto/pr41576_1.f90: Add interface.
* gfortran.dg/lto/pr41521_0.f90: Disable lto-type-mismatch
* gfortran.dg/lto/pr60635_0.f90: Disable lto-type-mismatch.
* gfortran.dg/lto/20091028-1_1.c: Fix return type.
* gcc.dg/lto/20120723_0.c: Disbale lto-type-mismatch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223258 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-utils.h')
-rw-r--r-- | gcc/ipa-utils.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h index 13c59a830ba..3378f6946f9 100644 --- a/gcc/ipa-utils.h +++ b/gcc/ipa-utils.h @@ -63,7 +63,9 @@ possible_polymorphic_call_targets (tree, HOST_WIDE_INT, void **cache_token = NULL, bool speuclative = false); odr_type get_odr_type (tree, bool insert = false); -bool odr_type_p (const_tree t); +bool type_in_anonymous_namespace_p (const_tree); +bool type_with_linkage_p (const_tree); +bool odr_type_p (const_tree); bool possible_polymorphic_call_target_p (tree ref, gimple stmt, struct cgraph_node *n); void dump_possible_polymorphic_call_targets (FILE *, tree, HOST_WIDE_INT, const ipa_polymorphic_call_context &); @@ -85,6 +87,9 @@ bool types_must_be_same_for_odr (tree, tree); bool types_odr_comparable (tree, tree, bool strict = false); cgraph_node *try_speculative_devirtualization (tree, HOST_WIDE_INT, ipa_polymorphic_call_context); +void warn_types_mismatch (tree t1, tree t2); +bool odr_or_derived_type_p (const_tree t); +bool odr_types_equivalent_p (tree type1, tree type2); /* Return vector containing possible targets of polymorphic call E. If COMPLETEP is non-NULL, store true if the list is complete. |