------- Comment #25 from jason at gcc dot gnu dot org 2010-02-03 00:01 -------
In fact the debug info is currently OK, at least for this testcase, because we
generate debug info for the signature of X::func at the end of the definition
of X, well before we start optimizing X::func.
But here's a C testcase where we lose debug info about a parameter that was
optimized away: there are no formal parameters in the DWARF output for f.
int i;
static int f(int) __attribute ((noinline));
static int f(int x) { return i; }
int main()
{
return f(42);
}
so, this becomes a wrong-debug regression, and should probably have its
priority reduced.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42336