From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26153 invoked by alias); 20 Feb 2011 14:48:32 -0000 Received: (qmail 26142 invoked by uid 22791); 20 Feb 2011 14:48:30 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,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; Sun, 20 Feb 2011 14:48:26 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/47822] [4.6 Regression] Multiple test suite failures due to revision 170321 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: Target Status Last reconfirmed Component Target Milestone Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 20 Feb 2011 14:54: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: 2011-02/txt/msg02318.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47822 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |*-darwin* Status|UNCONFIRMED |NEW Last reconfirmed| |2011.02.20 14:48:01 Component|lto |target Target Milestone|--- |4.6.0 Ever Confirmed|0 |1 --- Comment #1 from Richard Guenther 2011-02-20 14:48:01 UTC --- Hm. The target builtins appear in BLOCK_VARs of DECL_INITIAL of the TRANSLATION_UNIT_DECL. There is appearantly a builtin for IX86_BUILTIN_MAX, which is obviously bogus. Does darwin define additional target specific builtins that are not covered by the builtin_decl target hook (that would be a bug anyway)? It seems to do via do { \ darwin_init_cfstring_builtins ((unsigned) (IX86_BUILTIN_MAX));\ darwin_rename_builtins (); \ } while(0) which will result in all programs using those builtins fail with LTO in the same way (that all builtins are streamed in now via the TU decl isn't optimal, but per-se not a bug). The code doesn't even save the builtin somewhere retrievable, so the following is obviously not correct but solves the ICE: Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 170336) +++ config/i386/i386.c (working copy) @@ -25821,7 +25821,11 @@ static tree ix86_builtin_decl (unsigned code, bool initialize_p ATTRIBUTE_UNUSED) { +#ifdef TARGET_MACHO if (code >= IX86_BUILTIN_MAX) + return implicit_built_in_decls[BUILT_IN_MEMSET]; +#endif + if (code >= IX86_BUILTIN_MAX) return error_mark_node; return ix86_builtins[code]; I think the darwin machinery should simply arrange to append to the existing array, reserving an enum value if TARGET_MACHO (or sth other appropriate) and store the decl there. I will look into stripping out builtins from the TU BLOCK_VARS (that won't solve the ICE when someone really uses that darwin builtin).