From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22204 invoked by alias); 24 Nov 2004 21:32:10 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 21476 invoked by uid 48); 24 Nov 2004 21:31:53 -0000 Date: Wed, 24 Nov 2004 21:32:00 -0000 Message-ID: <20041124213153.21475.qmail@sourceware.org> From: "hjl at lucon dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040528071502.15700.aj@gcc.gnu.org> References: <20040528071502.15700.aj@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/15700] [4.0 Regression] [unit-at-a-time] Inlining problem leads to miscompilation of glibc X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg02959.txt.bz2 List-Id: ------- Additional Comments From hjl at lucon dot org 2004-11-24 21:31 ------- I am not sure why it shouldn't work. Given static void foo_internal () { } extern void (*foo) (); void xxx () { foo = &foo_internal; } void bar () { foo_internal (); } Gcc 4.0 has no problems inlining foo_internal and emitting its body at the same time. The only difference here is the address of foo_internal vs. an external alias of foo_internal. In fact, gcc 4.0 does the right thing for static void foo_internal () { } extern void (*foo) (); void xxx () { foo = &foo_internal; } extern __typeof (foo_internal) work __attribute__ ((alias ("foo_internal"))); void bar () { foo_internal (); } Gcc 4.0 has to do inlining and emitting body of a static functon anyway. How to make it to work with external alias? -- What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15700