public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/50822] [4.7 regression] Solaris/SPARC bootstrap failure with Sun as: invalid assembler for ios_init.cc Date: Mon, 07 Nov 2011 15:48:00 -0000 [thread overview] Message-ID: <bug-50822-4-OC69EnV2Gk@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-50822-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50822 --- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-11-07 15:47:08 UTC --- Hi, the problem seems to be due to fact that C++ FE output extern aliases. This is not quite documented and they was simply removed by the old alias pair handling code (I believe by accident rather than by design), while the new code confuses them with weakrefs and attempts to output into final assembly. I think those aliases might potentially be useful for alias analysis and == folding - i.e. they provide knowledge that those two variables/functions must be equivalent. So instead of convincing C++ FE to not output them it seems better to make cgraph code to deal with them well. For 4.8 we may start using the alias walkers in the alias analysis and folding to actually make use of this. I think it only imply need to ignore them when the functions are being output. I am testing the attached patch that ought to solve the issue. Index: cgraphunit.c =================================================================== --- cgraphunit.c (revision 181033) +++ cgraphunit.c (working copy) @@ -2101,13 +2101,15 @@ output_weakrefs (void) struct varpool_node *vnode; for (node = cgraph_nodes; node; node = node->next) if (node->alias && DECL_EXTERNAL (node->decl) - && !TREE_ASM_WRITTEN (node->decl)) + && !TREE_ASM_WRITTEN (node->decl) + && lookup_attribute ("weakref", DECL_ATTRIBUTES (node->decl))) assemble_alias (node->decl, node->thunk.alias ? DECL_ASSEMBLER_NAME (node->thunk.alias) : get_alias_symbol (node->decl)); for (vnode = varpool_nodes; vnode; vnode = vnode->next) if (vnode->alias && DECL_EXTERNAL (vnode->decl) - && !TREE_ASM_WRITTEN (vnode->decl)) + && !TREE_ASM_WRITTEN (vnode->decl) + && lookup_attribute ("weakref", DECL_ATTRIBUTES (vnode->decl))) assemble_alias (vnode->decl, vnode->alias_of ? DECL_ASSEMBLER_NAME (vnode->alias_of) : get_alias_symbol (vnode->decl));
next prev parent reply other threads:[~2011-11-07 15:48 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-10-21 13:40 [Bug bootstrap/50822] New: " ro at gcc dot gnu.org 2011-10-21 13:38 ` [Bug bootstrap/50822] " ro at gcc dot gnu.org 2011-10-21 13:38 ` ro at gcc dot gnu.org 2011-10-21 13:42 ` ro at gcc dot gnu.org 2011-10-25 9:07 ` ro at gcc dot gnu.org 2011-10-25 15:04 ` ro at gcc dot gnu.org 2011-10-27 11:28 ` rguenth at gcc dot gnu.org 2011-10-27 11:35 ` ro at CeBiTec dot Uni-Bielefeld.DE 2011-11-07 15:48 ` hubicka at gcc dot gnu.org [this message] 2011-11-07 18:09 ` ro at CeBiTec dot Uni-Bielefeld.DE 2011-11-08 12:56 ` ro at CeBiTec dot Uni-Bielefeld.DE 2011-11-09 12:42 ` hubicka at gcc dot gnu.org 2011-11-12 13:39 ` hubicka at gcc dot gnu.org 2011-11-23 16:36 ` ro at gcc dot gnu.org
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-50822-4-OC69EnV2Gk@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: linkBe 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).