Bug 49214

Summary: Wrong stabs generated for -O
Product: [Retired] Red Hat Linux Reporter: hjl
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-25 09:05:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The testcase none

Description hjl 2001-07-17 01:00:35 UTC
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-17 01:01:12 UTC
Created attachment 23748 [details]
The testcase

Comment 2 Glen Foster 2001-07-17 18:59:54 UTC
This defect considered SHOULD-FIX for Fairfax gold-release.

Comment 3 Jakub Jelinek 2001-07-20 12:22:12 UTC
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 09:04:58 UTC
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 13:25:54 UTC
Issue appears fixed with gcc-2.96-104, so closing out.