Hi, while looking into the PR testcase I noticed that we detect wrong duplicate types. This is because we compute DECL_ASSEMBLER_NAME of a type variant which is not necessary.
Bootstrapped/regested x86_64-linux and I checked dumps of xalancbmk to verify that nothing changes in ODR type merging except for the duplicates. OK? Honza * tree.c (need_assembler_name_p): Do not compute mangled name for variabt types. Index: tree.c =================================================================== --- tree.c (revision 233707) +++ tree.c (working copy) @@ -5329,6 +5329,7 @@ need_assembler_name_p (tree decl) && TREE_CODE (decl) == TYPE_DECL && DECL_NAME (decl) && decl == TYPE_NAME (TREE_TYPE (decl)) + && TYPE_MAIN_VARIANT (TREE_TYPE (decl)) == TREE_TYPE (decl) && !TYPE_ARTIFICIAL (TREE_TYPE (decl)) && (type_with_linkage_p (TREE_TYPE (decl)) || TREE_CODE (TREE_TYPE (decl)) == INTEGER_TYPE)