public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "grigory at stl dot sarov dot ru" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/12698] New: Multiple definition of covariant thunk in the single unit
Date: Tue, 21 Oct 2003 05:21:00 -0000	[thread overview]
Message-ID: <20031021045355.12698.grigory@stl.sarov.ru> (raw)

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: Multiple definition of covariant thunk in the single
                    unit
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: grigory at stl dot sarov dot ru
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-redhat-linux
  GCC host triplet: i686-redhat-linux
GCC target triplet: i686-redhat-linux

Compiling the test-case listed below, g++ 3.4 gives multiple definition of a 
covariant thunk. Two symbols with the same name are emitted in the asm source 
so assembler fails in the end. Probably the second thunk definition appeared 
due to incorrect offset encoding.

Failure appear both on i686-redhat-linux and ia64-suse-linux.

$ cat thunk.cpp
	struct c1 {};
	struct c0 {
	    int i;
	    virtual c1& f10() {};
	};
	struct c2 : virtual c1, c0 { };
	struct c6 : virtual c2, c0 {
	    virtual c2& f10() {};
	};
	struct c14 : virtual c2 { };
	struct c19 : virtual ::c6 {
	  virtual class ::c14& f10() {};
	};
	c19 obj;

$ g++ -c thunk.cpp
thunk.cpp:10: warning: direct base `c0' inaccessible in `c6' due to ambiguity
/home/grigory/tmp/cc8J96E3.s: Assembler messages:
/home/grigory/tmp/cc8J96E3.s:357: Error: symbol `_ZTch0_v0_n12_N3c193f10Ev' is 
already defined
/home/grigory/tmp/cc8J96E3.s:405: Error: symbol `_ZTcv0_n20_v0_n12_N3c193f10Ev' 
is already defined


             reply	other threads:[~2003-10-21  4:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-21  5:21 grigory at stl dot sarov dot ru [this message]
2003-10-21 13:32 ` [Bug c++/12698] " bangerth at dealii dot org
2003-10-21 13:50 ` nathan at gcc dot gnu dot org
2003-10-24  7:59 ` cvs-commit at gcc dot gnu dot org
2003-10-24  8:09 ` nathan at gcc dot gnu dot org
2003-12-04  9:46 ` pinskia at gcc dot gnu dot 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=20031021045355.12698.grigory@stl.sarov.ru \
    --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).