Bug 36828 - 4.3.1 when optimising for size generates much larger code than 4.0.x
Summary: 4.3.1 when optimising for size generates much larger code than 4.0.x
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.3.1
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks:
 
Reported: 2008-07-15 00:38 UTC by Zoltan Kocsi
Modified: 2015-01-02 22:55 UTC (History)
3 users (show)

See Also:
Host: x86-elf-linux
Target: arm-elf-unknown
Build: x86-elf-linux
Known to work:
Known to fail:
Last reconfirmed: 2009-04-29 15:50:22


Attachments
Test code to demonstrate the size increase (2.19 KB, text/plain)
2008-07-15 22:33 UTC, Zoltan Kocsi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltan Kocsi 2008-07-15 00:38:10 UTC
The attached C file generates a significantly larger object code with the new compiler than with the old one. The exact command line for gcc is in the first comment of the C file.
Comment 1 Zoltan Kocsi 2008-07-15 22:33:46 UTC
Created attachment 15915 [details]
Test code to demonstrate the size increase

A short C file that compiles to about 60% larger with the new compiler, command line options can be find in the file itself
Comment 2 Joel Sherrill 2008-07-15 22:44:23 UTC
I attached this code earlier for you to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31849 along with size reports for various optimization levels (Os, O1, and O2) and gcc versions.  Is this a dupe of that PR or separate?  Can someone familiar with 31849 make a ruling?
Comment 3 Ramana Radhakrishnan 2009-04-29 15:50:22 UTC
The size regression occurs with 4.3.x but with trunk today I see a size reduction to 992 bytes which is in the ball park of the original size.


Comment 4 Joel Sherrill 2015-01-02 22:55:02 UTC
Based on the last comment, should this PR be closed. It has been five years.