This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/31528] Inlining with -Os increases code size
- From: "j at uriah dot heep dot sax dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Apr 2007 14:38:31 -0000
- Subject: [Bug middle-end/31528] Inlining with -Os increases code size
- References: <bug-31528-11199@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from j at uriah dot heep dot sax dot de 2007-04-10 15:38 -------
This code snippet can also be run through the i386 compiler (even though
the generated code will obviously be nonsensical). I've only got an older
version of that compiler at hand:
gcc41 (GCC) 4.1.2 20061229 (prerelease)
but even that one generates smaller code without the inlining:
j@uriah 197% gcc41 -Os -fno-inline -S bug66690.c
j@uriah 198% as bug66690.s
j@uriah 199% size
text data bss dec hex filename
141 0 0 141 8d a.out
j@uriah 200% gcc41 -Os -S bug66690.c
j@uriah 201% as bug66690.s
j@uriah 202% size
text data bss dec hex filename
182 0 0 182 b6 a.out
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31528