diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-06-08 22:37:53 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-06-08 20:37:53 +0000 |
commit | 6542950e80b2ac7edbdba43f5147b15df282012e (patch) | |
tree | 508f4d43c761a49c59562b9a85f928d521013284 /gcc/lto | |
parent | 97ded4cd2072029ac4d6d86e5b6eb5225961a27d (diff) | |
download | gcc-6542950e80b2ac7edbdba43f5147b15df282012e.zip gcc-6542950e80b2ac7edbdba43f5147b15df282012e.tar.gz gcc-6542950e80b2ac7edbdba43f5147b15df282012e.tar.bz2 |
re PR lto/65378 (Tweak to wording of -Wodr message)
PR lto/65378
* ipa-utils.h (warn_types_mismatch): Update prototype.
* ipa-devirt.c (odr_types_equivalent_p): Add loc1/loc2
parameters.
(type_mismatch_p): New function.
(warn_types_mismatch): Reorg to work better on non-C++ types.
(odr_types_equivalent_p): Add loc1/loc2 parameters.
(add_type_duplicate): Update.
* lto-symtab.c (warn_type_compatibility_p): Fix call of
odr_or_derived_type_p.
(lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
From-SVN: r224248
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/lto/lto-symtab.c | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index d9dffef..9ad289a 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,5 +1,13 @@ 2015-06-06 Jan Hubicka <hubicka@ucw.cz> + PR lto/65378 + * lto-symtab.c (warn_type_compatibility_p): Fix call of + odr_or_derived_type_p. + (lto_symtab_merge_decls_2): Update call of warn_types_mismatch. + +2015-06-08 Jan Hubicka <hubicka@ucw.cz> + + * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of pointers. diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 32d1b25..e808006 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -212,7 +212,7 @@ warn_type_compatibility_p (tree prevailing_type, tree type) int lev = 0; /* C++ provide a robust way to check for type compatibility via the ODR rule. */ - if (odr_or_derived_type_p (prevailing_type) && odr_type_p (type) + if (odr_or_derived_type_p (prevailing_type) && odr_or_derived_type_p (type) && !odr_types_equivalent_p (prevailing_type, type)) lev = 2; @@ -542,7 +542,9 @@ lto_symtab_merge_decls_2 (symtab_node *first, bool diagnosed_p) "declaration", decl); if (diag) warn_types_mismatch (TREE_TYPE (prevailing->decl), - TREE_TYPE (decl)); + TREE_TYPE (decl), + DECL_SOURCE_LOCATION (prevailing->decl), + DECL_SOURCE_LOCATION (decl)); diagnosed_p |= diag; } else if ((DECL_USER_ALIGN (prevailing->decl) |