Bug 35861

Summary: code bloat due to -finline-small-functions
Product: gcc Reporter: Andreas Kaiser <a.kaiser>
Component: middle-endAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED DUPLICATE    
Severity: normal CC: a.kaiser, eric.weddington, gcc-bugs, hubicka
Priority: P3    
Version: 4.3.0   
Target Milestone: ---   
Host: winavr 20080402 release Target: avr
Build: Known to work:
Known to fail: Last reconfirmed:
Attachments: sample code
sample code w/o inline assembly

Description Andreas Kaiser 2008-04-07 21:52:54 UTC
In 4.3.0 -finline-small-functions cause excessive code bloat even though according to the docs this option should not significantly increase code size.

Code size 4.1.2: 0x8A
Code size 4.3.0: 0x1EA
Code size 4.3.0: 0x88 with -fno-inline-small-functions

Command line:
  avr-gcc -Os -c rf12.c
or
  avr-gcc -Os -fno-inline-small-functions -c rf12.c
Comment 1 Andreas Kaiser 2008-04-07 21:54:08 UTC
Created attachment 15442 [details]
sample code
Comment 2 Andrew Pinski 2008-04-07 21:59:02 UTC
I think this is just a miscounting of inline-asm.
Comment 3 Andreas Kaiser 2008-04-07 22:14:52 UTC
Created attachment 15443 [details]
sample code w/o inline assembly

Same situation when inline asm is removed.
Comment 4 Richard Biener 2008-04-08 10:02:21 UTC

*** This bug has been marked as a duplicate of 30908 ***