diff mbox series

[Ada] Add emergency dump after an ICE

Message ID 2117384.avN8M3Yhio@fomalhaut
State New
Headers show
Series [Ada] Add emergency dump after an ICE | expand

Commit Message

Eric Botcazou Sept. 10, 2020, 4:04 p.m. UTC
This is only for internal debugging purposes.

Tested on x86_64-suse-linux, applied on the mainline.


2020-09-10  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/misc.c: Include tree-pass.h.
	(internal_error_function): Call emergency_dump_function.
diff mbox series

Patch

diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 3999f9cc2be..183daf33fb6 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -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);