diff options
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) |