diff mbox

Committed: Fix PR55257: g++.dg/debug/dwarf2/non-virtual-thunk.C and heads-up target maintainers

Message ID 201211130616.qAD6GqXf018500@ignucius.se.axis.com
State New
Headers show

Commit Message

Hans-Peter Nilsson Nov. 13, 2012, 6:16 a.m. UTC
...those of you who don't have the equivalent of the patch
below in your ports, that is.  You'll likely only notice through
a slightly reduced debugging experience and
g++.dg/debug/dwarf2/non-virtual-thunk.C failing.  Yes, the docs
should mention these functions need to be called IMHO obviously,
but not by me not now maybe later.  Tested cris-elf, committed.

gcc:
	PR target/55257
	* config/cris/cris.c (cris_asm_output_mi_thunk): Call
	final_start_function and final_end_function.


brgds, H-P
diff mbox

Patch

Index: gcc/config/cris/cris.c
===================================================================
--- gcc/config/cris/cris.c	(revision 192677)
+++ gcc/config/cris/cris.c	(working copy)
@@ -2698,6 +2698,9 @@  cris_asm_output_mi_thunk (FILE *stream,
 			  HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED,
 			  tree funcdecl)
 {
+  /* Make sure unwind info is emitted for the thunk if needed.  */
+  final_start_function (emit_barrier (), stream, 1);
+
   if (delta > 0)
     fprintf (stream, "\tadd%s " HOST_WIDE_INT_PRINT_DEC ",$%s\n",
 	     ADDITIVE_SIZE_MODIFIER (delta), delta,
@@ -2735,6 +2738,8 @@  cris_asm_output_mi_thunk (FILE *stream,
       if (TARGET_V32)
 	fprintf (stream, "\tnop\n");
     }
+
+  final_end_function ();
 }
 
 /* Boilerplate emitted at start of file.