public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rusty at rustcorp dot com dot au" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/35728] New: Inlined function via function pointer emitted unnecessarily
Date: Fri, 28 Mar 2008 02:38:00 -0000 [thread overview]
Message-ID: <bug-35728-4536@http.gcc.gnu.org/bugzilla/> (raw)
>From http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079 now we get:
.file "foo.c"
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "Hello World.\n"
.text
.p2align 4,,15
.type funk, @function
funk:
pushl %ebp
movl $.LC0, %eax
movl %esp, %ebp
popl %ebp
ret
.size funk, .-funk
.section .rodata.str1.1
.LC1:
.string "Hello World."
.text
.p2align 4,,15
.globl main
.type main, @function
main:
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp
movl %esp, %ebp
pushl %ecx
subl $4, %esp
movl $.LC1, (%esp)
call puts
addl $4, %esp
popl %ecx
popl %ebp
leal -4(%ecx), %esp
ret
.size main, .-main
.ident "GCC: (Ubuntu 4.3.0-1ubuntu1) 4.3.0"
.section .note.GNU-stack,"",@progbits
Note funk (a static function) is unused, and successfully inlined, but still
omitted. Replicated on powerpc as well, so not x86-specific.
--
Summary: Inlined function via function pointer emitted
unnecessarily
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rusty at rustcorp dot com dot au
GCC build triplet: i386-linux-gnu-gcc-4.1
GCC host triplet: i386-linux-gnu-gcc-4.1
GCC target triplet: i386-linux-gnu-gcc-4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35728
next reply other threads:[~2008-03-28 2:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 2:38 rusty at rustcorp dot com dot au [this message]
2008-03-28 10:16 ` [Bug c/35728] " rguenth at gcc dot gnu dot org
2008-09-06 12:11 ` hubicka at gcc dot gnu dot org
2008-12-03 1:49 ` [Bug middle-end/35728] " pinskia at gcc dot gnu dot org
2008-12-03 1:49 ` pinskia at gcc dot gnu dot org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-35728-4536@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).