From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31865 invoked by alias); 28 Mar 2008 02:38:51 -0000 Received: (qmail 31557 invoked by uid 48); 28 Mar 2008 02:38:01 -0000 Date: Fri, 28 Mar 2008 02:38:00 -0000 Subject: [Bug c/35728] New: Inlined function via function pointer emitted unnecessarily X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rusty at rustcorp dot com dot au" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg02222.txt.bz2 >>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