re PR lto/87089 (tree check: expected class 'type', have 'declaration' (namespace_dec...
authorJan Hubicka <hubicka@ucw.cz>
Sat, 9 Feb 2019 18:01:03 +0000 (19:01 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 9 Feb 2019 18:01:03 +0000 (18:01 +0000)
PR lto/87809
* tree.c (fld_simplified_type_name): Use DECL_ASSEMBLER_NAME_SET_P
instead of type_with_linkage.

From-SVN: r268728

gcc/ChangeLog
gcc/tree.c

index 720ec2ebf611591c60feb075496317c513c66775..320832ac2da076d9c889ed3046402bd26831f44e 100644 (file)
@@ -1,3 +1,9 @@
+2019-02-09  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR lto/87809
+       * tree.c (fld_simplified_type_name): Use DECL_ASSEMBLER_NAME_SET_P
+       instead of type_with_linkage.
+
 2019-02-09  Jan Hubicka  <hubicka@ucw.cz>
 
        PR ipa/88755
index 9e55499455639c0a77344ba13b6891421c23f753..3e51a85744cc8b0b8ed06efe4376de00873e1c7f 100644 (file)
@@ -5152,7 +5152,8 @@ fld_simplified_type_name (tree type)
   /* Drop TYPE_DECLs in TYPE_NAME in favor of the identifier in the
      TYPE_DECL if the type doesn't have linkage.
      this must match fld_  */
-  if (type != TYPE_MAIN_VARIANT (type) || ! type_with_linkage_p (type))
+  if (type != TYPE_MAIN_VARIANT (type)
+      || !DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (type)))
     return DECL_NAME (TYPE_NAME (type));
   return TYPE_NAME (type);
 }