public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/47822] [4.6 Regression] Multiple test suite failures due to revision 170321
Date: Sun, 20 Feb 2011 14:54:00 -0000	[thread overview]
Message-ID: <bug-47822-4-5fXpfpC4bL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47822-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47822

Richard Guenther <rguenth at gcc dot gnu.org> 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 <rguenth at gcc dot gnu.org> 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).


  reply	other threads:[~2011-02-20 14:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-20 11:13 [Bug lto/47822] New: " dominiq at lps dot ens.fr
2011-02-20 14:54 ` rguenth at gcc dot gnu.org [this message]
2011-02-20 15:14 ` [Bug target/47822] " rguenth at gcc dot gnu.org
2011-02-20 15:21 ` dominiq at lps dot ens.fr
2011-02-20 15:49 ` rguenth at gcc dot gnu.org
2011-02-20 16:24 ` dominiq at lps dot ens.fr
2011-02-20 17:23 ` rguenth at gcc dot gnu.org
2011-02-20 17:28 ` rguenth at gcc dot gnu.org
2011-02-20 18:49 ` mrs at gcc dot gnu.org
2011-02-20 19:03 ` mrs at gcc dot gnu.org
2011-02-20 19:35 ` dominiq at lps dot ens.fr
2011-02-20 19:40 ` mikestump at comcast dot net
2011-02-20 19:54 ` dominiq at lps dot ens.fr
2011-02-20 20:40 ` howarth at nitro dot med.uc.edu
2011-02-21  5:14 ` mrs at gcc dot gnu.org
2011-02-21  9:45 ` rguenth at gcc dot gnu.org
2011-02-21 10:09 ` dominiq at lps dot ens.fr
2011-02-21 10:37 ` iains at gcc dot gnu.org
2011-02-21 11:19 ` rguenth at gcc dot gnu.org
2011-02-21 21:34 ` mikestump at comcast dot net
2011-02-21 21:38 ` mikestump at comcast dot net
2011-02-21 21:48 ` mrs at gcc dot gnu.org
2011-02-22 10:52 ` dominiq at lps dot ens.fr
2011-02-22 12:01 ` mikestump at comcast dot net
2011-02-22 12:37 ` mikestump at comcast dot net

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-47822-4-5fXpfpC4bL@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).