[Bug debug/54793] the location of a formal_parameter is not started from a function entry with -mfentry
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 3 14:12:00 GMT 2012
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).
More information about the Gcc-bugs
mailing list