re PR lto/84105 (Segmentation fault in pp_tree_identifier() during LTO)
authorAldy Hernandez <aldyh@redhat.com>
Wed, 31 Jan 2018 10:42:52 +0000 (10:42 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Wed, 31 Jan 2018 10:42:52 +0000 (10:42 +0000)
PR lto/84105
* tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
an IDENTIFIER_NODE for FUNCTION_TYPE's.

From-SVN: r257228

gcc/ChangeLog
gcc/tree-pretty-print.c

index 84efedde87f21222072bb1939b4b2483e216de1d..9b9a1c39b1394e25325b33a7046af1f7e17cda06 100644 (file)
@@ -1,3 +1,9 @@
+2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
+
+       PR lto/84105
+       * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
+       an IDENTIFIER_NODE for FUNCTION_TYPE's.
+
 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
 
        Revert
index 54a8dfa3b6f68d62630484c5373deefa95684469..73eb27c8e8fa9efe8553ba142d5adc38444cfb0d 100644 (file)
@@ -1822,7 +1822,9 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
            pp_string (pp, "<null method basetype>");
          pp_colon_colon (pp);
        }
-      if (TYPE_NAME (node) && DECL_NAME (TYPE_NAME (node)))
+      if (TYPE_IDENTIFIER (node))
+       dump_generic_node (pp, TYPE_NAME (node), spc, flags, false);
+      else if (TYPE_NAME (node) && DECL_NAME (TYPE_NAME (node)))
        dump_decl_name (pp, TYPE_NAME (node), flags);
       else if (flags & TDF_NOUID)
        pp_printf (pp, "<Txxxx>");