public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Yufeng Zhang <Yufeng.Zhang@arm.com>
Cc: Jan Hubicka <hubicka@ucw.cz>,
	Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	"rth@redhat.com" <rth@redhat.com>
Subject: Re: ipa-visibility TLC 2/n
Date: Wed, 28 May 2014 21:56:00 -0000	[thread overview]
Message-ID: <20140528215635.GB30961@kam.mff.cuni.cz> (raw)
In-Reply-To: <53861F33.20605@arm.com>

> Any update?
> 
> I've managed to generate a simple test case from
> libstdc++-v3/src/c++98/strstream.cc which reproduces the issue on
> ARM that Ramana has reported previously:
> 
> 
> template<class _CharT>  struct char_traits;
> 
> template<typename _CharT, typename _Traits>
> class basic_ios
> {
> };
> 
> template<typename _CharT, typename _Traits = char_traits<_CharT> >
> class basic_istream : virtual public basic_ios<_CharT, _Traits>
> {
> protected:
>   int _M_gcount;
>   virtual ~basic_istream()
>     { }
> };
> 
> class istrstream : public basic_istream<char>
> {
>   virtual ~istrstream();
> };
> 
> istrstream::~istrstream()
> {
> }
> 
> ------------------ CUT ------------------
> 
> With an arm-none-linux-gnueabi gcc configured as:
> 
> ./gcc/configure --target=arm-none-linux-gnueabi
> --enable-gnu-indirect-function --enable-shared --with-arch=armv7-a
> --with-fpu=vfpv3-d16 --with-float=softfp --with-arch=armv7-a
> (irrelevant parts omitted)
> 
> With the following command line options:
> 
>  -fdata-sections    -O2  -fPIC  -S ./test.cpp
> 
> We'll see
> 
> ./test.cpp:17:7: error: istrstream::_ZTV10istrstream.localalias.0
> causes a section type conflict with istrstream::_ZTV10istrstream
>  class istrstream : public basic_istream<char>
>        ^
> ./test.cpp:17:7: note: 'istrstream::_ZTV10istrstream' was declared here

This seems to be same cause as on AIX - we do section for decl rather than
original.  The following patch seems to fix it.  Does it allows bootstrap
for you? (it doesn't for AIX. but that seems bug in output machinery)

Index: varasm.c
===================================================================
--- varasm.c	(revision 210914)
+++ varasm.c	(working copy)
@@ -1083,6 +1083,9 @@
 {
   addr_space_t as = ADDR_SPACE_GENERIC;
   int reloc;
+  symtab_node *snode = symtab_get_node (decl);
+  if (snode)
+    decl = symtab_alias_ultimate_target (snode)->decl;
 
   if (TREE_TYPE (decl) != error_mark_node)
     as = TYPE_ADDR_SPACE (TREE_TYPE (decl));
> 
> 
> Yufeng

  parent reply	other threads:[~2014-05-28 21:56 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-25  5:54 Jan Hubicka
2014-05-25 20:45 ` Ramana Radhakrishnan
2014-05-25 22:23   ` Jan Hubicka
2014-05-26  1:04     ` Jan Hubicka
2014-05-26  5:29       ` Ramana Radhakrishnan
2014-05-27 20:06         ` Jan Hubicka
2014-05-27 22:20           ` Jan Hubicka
2014-05-28 17:39             ` Yufeng Zhang
2014-05-28 19:52               ` Jan Hubicka
2014-05-28 21:56               ` Jan Hubicka [this message]
2014-05-29 14:17                 ` Yufeng Zhang
2014-05-30 16:18                   ` Ramana Radhakrishnan
2014-05-26 15:39 ` Martin Liška
2014-05-28 21:44 David Edelsohn
2014-05-28 22:31 ` Jan Hubicka
2014-05-28 22:44   ` David Edelsohn
2014-05-28 23:17     ` Jan Hubicka
2014-05-29  8:08       ` Richard Sandiford
2014-05-29 17:12         ` Jan Hubicka
2014-05-30  7:20           ` Richard Sandiford
2014-05-30 15:50             ` David Edelsohn
2014-06-08 16:44               ` Jan Hubicka
2014-06-10  8:51                 ` Richard Biener
2014-06-08 16:49               ` Jan Hubicka
2014-06-08 16:54               ` Jan Hubicka
2014-06-08 16:58                 ` Jan Hubicka
2014-06-10 13:08                   ` David Edelsohn
2014-06-10 18:02                     ` Jan Hubicka
2014-06-10 22:23                       ` David Edelsohn
2014-06-10 22:55                         ` Jan Hubicka
2014-06-11 14:26                           ` Rainer Orth
2014-06-11 17:02                             ` Jan Hubicka
2014-06-12 10:43                               ` Rainer Orth
2014-06-12 13:33                                 ` Rainer Orth
2014-06-13  3:22                                 ` Jan Hubicka
2014-06-11  8:17                         ` Jan Hubicka
2014-05-30 17:24             ` David Edelsohn
2014-05-30 21:02               ` Jan Hubicka
2014-05-31  0:57                 ` David Edelsohn
2014-05-31  7:42                   ` Richard Sandiford
2014-05-31 14:43                     ` David Edelsohn
2014-06-03 13:53               ` David Edelsohn
2014-06-06  7:10                 ` Jan Hubicka
2014-06-06 15:53                   ` David Edelsohn

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=20140528215635.GB30961@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=Ramana.Radhakrishnan@arm.com \
    --cc=Yufeng.Zhang@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rth@redhat.com \
    /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).