public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58060] New: separate compilation of gnu multiversioning gives undefined/multiple defined symbols at link time
@ 2013-08-02 14:52 mib.bugzilla at gmail dot com
  2013-08-02 14:53 ` [Bug c++/58060] " mib.bugzilla at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: mib.bugzilla at gmail dot com @ 2013-08-02 14:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58060
           Summary: separate compilation of gnu multiversioning gives
                    undefined/multiple defined symbols at link time
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mib.bugzilla at gmail dot com

Created attachment 30592
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30592&action=edit
test case part 1

I tried gnu multiversioning with separate compilation but I get both these
messages at link time: multiple defined symbols and undefined symbol. 

g++ -o foo.exe mv6c-1.o mv6c.o
mv6c.o: In function `foo()':
mv6c.C:(.text+0x0): multiple definition of `foo()'
mv6c-1.o:mv6c-1.C:(.text+0x0): first defined here
mv6c-1.o: In function `_Z3foov.resolver':
mv6c-1.C:(.text._Z3foov.resolver[_Z3foov.resolver]+0x1b): undefined reference
to `_Z3foov.arch_corei7'
collect2: error: ld returned 1 exit status
-bash-4.1$ cp mv6c*C ~/my_home
-bash-4.1$ cat mv6c.C
  /* corei7 version of foo.  */
  __attribute__ ((target("arch=corei7")))
  int foo () { return 7; }
// I thought this compilation unit would create a function with the name
arch_corei7, but it just creates a foo without target decoration


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/58060] separate compilation of gnu multiversioning gives undefined/multiple defined symbols at link time
  2013-08-02 14:52 [Bug c++/58060] New: separate compilation of gnu multiversioning gives undefined/multiple defined symbols at link time mib.bugzilla at gmail dot com
@ 2013-08-02 14:53 ` mib.bugzilla at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: mib.bugzilla at gmail dot com @ 2013-08-02 14:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from mib.bugzilla at gmail dot com ---
Created attachment 30593
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30593&action=edit
test case part 2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-02 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-02 14:52 [Bug c++/58060] New: separate compilation of gnu multiversioning gives undefined/multiple defined symbols at link time mib.bugzilla at gmail dot com
2013-08-02 14:53 ` [Bug c++/58060] " mib.bugzilla at gmail dot com

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).