http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54793



Jakub Jelinek <jakub at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|WAITING                     |NEW

                 CC|                            |aoliva at gcc dot gnu.org,

                   |                            |jason at gcc dot gnu.org,

                   |                            |rth at gcc dot gnu.org



--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-03 
14:12:20 UTC ---

That said, it can be reproduced even on:

int

foo (int a, int b)

{

  asm volatile ("nop");

  a = 1;

  return a + b;

}

with -g -O2 -mfentry -p -dA.  The issue is that FUNCTION_PROFILER before

epilogue is emitted really very early, before processing any

NOTE_INSN_VAR_LOCATION that are before the first real insn.

If the targetm.asm_out.function_prologue hook is the default, outputting

nothing, perhaps we could consider as ugly hack to process the

NOTE_INSN_VAR_LOCATION notes before any non-note insn before calling the

FUNCTION_PROFILER, or, just forcefully use the function start label in

dwarf2out_var_location for notes that are before first real insn, perhaps limit

that to #ifdef HAVE_prologue if (HAVE_prologue) #endif to avoid damaging debug

info for !HAVE_prologue targets (if there are still any).

Reply via email to