aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2018-10-26 09:20:01 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2018-10-26 07:20:01 +0000
commit420672bc92e560bcebf12bdd1f3423362c93bf2e (patch)
treee87d7b82e66cbef3db48d8aa3b1869ae4fe53d64 /gcc/lto
parent99976e2700062d03a06412a92b345741f735deff (diff)
downloadgcc-420672bc92e560bcebf12bdd1f3423362c93bf2e.zip
gcc-420672bc92e560bcebf12bdd1f3423362c93bf2e.tar.gz
gcc-420672bc92e560bcebf12bdd1f3423362c93bf2e.tar.bz2
ipa-devirt.c (warn_odr): Make static.
* ipa-devirt.c (warn_odr): Make static. (types_same_for_odr): Drop strict variant. (types_odr_comparable): Likewise. (odr_or_derived_type_p): Look for main variants. (odr_name_hasher::equal): Cleanup comment. (odr_subtypes_equivalent): Add warn and warned arguments; check main variants. (type_variants_equivalent_p): break out from ... (odr_types_equivalent): ... here; go for main variants where needed. (warn_odr): ... here; turn static. (warn_types_mismatch): Compare mangled names of main variants. * ipa-utils.h (types_odr_comparable): Drop strict parameter. (type_with_linkage_p): Sanity check that we look at main variant. * lto.c (lto_read_decls): Only consider main variant to be ODR type. * tree.h (types_same_for_odr): Drop strict argument. From-SVN: r265519
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/lto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 598492d..2d52d4a 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -1827,7 +1827,7 @@ lto_read_decls (struct lto_file_decl_data *decl_data, const void *data,
type canonical of a derived type in the same SCC. */
if (!TYPE_CANONICAL (t))
gimple_register_canonical_type (t);
- if (odr_type_p (t))
+ if (TYPE_MAIN_VARIANT (t) == t && odr_type_p (t))
odr_types.safe_push (t);
}
/* Link shared INTEGER_CSTs into TYPE_CACHED_VALUEs of its