Bug 49214 - Wrong stabs generated for -O
Wrong stabs generated for -O
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-16 21:00 EDT by hjl
Modified: 2007-04-18 12:34 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-07-25 05:05:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The testcase (1.60 KB, text/plain)
2001-07-16 21:01 EDT, hjl
no flags Details

  None (edit)
Description hjl 2001-07-16 21:00:35 EDT
With -O, gcc 2.96-94 will generate wrong stabs for inlined functions with
args passed
in register and variable-sized array.

# gcc -O -g foo.i -S  && grep buf:r foo.s
.stabs
"buf:r(0,26)=*(0,27)=ar(0,28)=r(0,28);0000000000000;0037777777777;;0;-1;(0,2)",64,0,41,136847069

The number, 136847069, is incorrect.

BTW, gcc 3.0 has the same bug.
Comment 1 hjl 2001-07-16 21:01:12 EDT
Created attachment 23748 [details]
The testcase
Comment 2 Glen Foster 2001-07-17 14:59:54 EDT
This defect considered SHOULD-FIX for Fairfax gold-release.
Comment 3 Jakub Jelinek 2001-07-20 08:22:12 EDT
See http://gcc.gnu.org/ml/gcc-patches/2001-07/msg01416.html
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.
Comment 4 Jakub Jelinek 2001-07-25 05:04:58 EDT
gcc-2.96-95 will not emit the bogus stabs.
And Richard answered the question what could be done to emit a correct stab
instead:
From comments found in dwarf2out.c, I'm not sure we should do anything.
Comment 5 Jay Turner 2002-03-07 08:25:54 EST
Issue appears fixed with gcc-2.96-104, so closing out.

Note You need to log in before you can comment on or make changes to this bug.