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

login
register
mail settings
Submitter Hans-Peter Nilsson
Date Nov. 13, 2012, 6:16 a.m.
Message ID <201211130616.qAD6GqXf018500@ignucius.se.axis.com>
Download mbox | patch
Permalink /patch/198548/
State New
Headers show

Comments

Hans-Peter Nilsson - Nov. 13, 2012, 6:16 a.m.
...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

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.