From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18816 invoked by alias); 14 Dec 2010 15:35:12 -0000 Received: (qmail 18700 invoked by uid 22791); 14 Dec 2010 15:35:12 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Dec 2010 15:35:07 +0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/46940] New: asm aliases with linker plugin segfaults X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 14 Dec 2010 15:35:00 -0000 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: 2010-12/txt/msg01607.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46940 Summary: asm aliases with linker plugin segfaults Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassigned@gcc.gnu.org ReportedBy: hubicka@gcc.gnu.org extern __attribute__((visibility("hidden"))) void _moz_foo (void); extern __typeof (_moz_foo) _moz_foo __asm__ ("" "INT__foo") __attribute__((__visibility__("hidden"))) ; void _moz_foo(void) { printf ("blah\n"); } extern __typeof (_moz_foo) EXT__foo __asm__("" "_moz_foo") __attribute__((__alias__("" "INT__foo"))); evans:/abuild/jh/trunk-3/build-inst2/gcc/:[0]# more t2.c extern void _moz_foo (void); main() { _moz_foo (); } evans:/abuild/jh/trunk-3/build-inst2/gcc/:[0]# ./xgcc -B ./ -O2 -flto t.c t2.c -fuse-linker-plugin t.c: In function ?_moz_foo?: t.c:5:3: warning: incompatible implicit declaration of built-in function ?printf? [enabled by default] lto1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. lto-wrapper: ./xgcc returned 1 exit status lto-wrapper failedcollect2: ld returned 1 exit status The problem here is that we get prevailing definition of _moz_foo to be alias that has no cgraph node (nor alias node) attached. Bah.