Red Hat Bugzilla – Bug 49214
Wrong stabs generated for -O
Last modified: 2007-04-18 12:34:47 EDT
With -O, gcc 2.96-94 will generate wrong stabs for inlined functions with
in register and variable-sized array.
# gcc -O -g foo.i -S && grep buf:r foo.s
The number, 136847069, is incorrect.
BTW, gcc 3.0 has the same bug.
Created attachment 23748 [details]
This defect considered SHOULD-FIX for Fairfax gold-release.
for patch which makes sure the invalid stabs line will not be emitted.
As for what to do to emit a correct line, I really have no idea.
gcc-2.96-95 will not emit the bogus stabs.
And Richard answered the question what could be done to emit a correct stab
From comments found in dwarf2out.c, I'm not sure we should do anything.
Issue appears fixed with gcc-2.96-104, so closing out.