Add emergency dump after an ICE
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 10 Sep 2020 11:26:31 +0000 (13:26 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 10 Sep 2020 16:00:57 +0000 (18:00 +0200)
This is only for internal debugging purposes.

gcc/ada/ChangeLog:
* gcc-interface/misc.c: Include tree-pass.h.
(internal_error_function): Call emergency_dump_function.

gcc/ada/gcc-interface/misc.c

index 3999f9cc2be503bb0bf2fae51f0ec68ba061c2f1..183daf33fb63054ef27f4789041ef0ef458f2208 100644 (file)
@@ -35,6 +35,7 @@
 #include "stor-layout.h"
 #include "print-tree.h"
 #include "toplev.h"
+#include "tree-pass.h"
 #include "langhooks.h"
 #include "langhooks-def.h"
 #include "plugin.h"
@@ -307,6 +308,9 @@ internal_error_function (diagnostic_context *context, const char *msgid,
   /* Warn if plugins present.  */
   warn_if_plugins ();
 
+  /* Dump the representation of the function.  */
+  emergency_dump_function ();
+
   /* Reset the pretty-printer.  */
   pp_clear_output_area (context->printer);