Bug 70943

Summary: Less than optimal code
Product: [Retired] Red Hat Linux Reporter: Eric Hopper <eric-bugs>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-08-07 04:06:23 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
Source file to compile to reproduce
none
The assembly language output none

Description Eric Hopper 2002-08-07 04:03:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020606

Description of problem:
These two functions should generate much more similar assembly.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Take the example file, testswitch.cxx
2.g++ -pipe -march=athlon -mcpu=athlon -O2 -S testswitch.cxx
3.Look at testswitch.s and see how assembly output for functions test and test2
are pretty different.
	

Additional info: gcc-c++-2.96-112

Comment 1 Eric Hopper 2002-08-07 04:04:58 UTC
Created attachment 69226 [details]
Source file to compile to reproduce

Comment 2 Eric Hopper 2002-08-07 04:06:19 UTC
Created attachment 69227 [details]
The assembly language output

Comment 3 Jakub Jelinek 2002-08-07 11:34:48 UTC
This is certainly nothing which will change in 2.96-RH, as it is in
important bugfixes mode only.
If you get the same behaviour with gcc 3.3, file an enhancement request
at http://gcc.gnu.org/gnats.html.

Comment 4 Eric Hopper 2002-08-07 11:44:30 UTC
Well, I would love to test it on gcc 3.3 or something similar, but those things
aren't available in a standard non-beta distribution yet.  In fact AFAIK, gcc
3.3 isn't even released yet.

It seems odd to me that I should have to download and hand-build the unstable
CVS tree for a compiler simply so I can report a case of inadequate optimization.

Of course, the differences between 2.96 and 3.2 in the optimization department
are rather marked.  So if you insist I try it in a 3.2 version when RH 8.0 comes
out, I'll do so.

Comment 5 Jakub Jelinek 2002-08-07 11:50:11 UTC
Well, at least 3.1 is available for 7.3 as secondary compiler (there is
a special RHN channel for it), so you can check that. The point in filing
PR in gcc GNATS is that your enhancement request will get there greater
audience.