public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/99907] New: (On MS Windows) Multiple definition errors with <coroutine> included in two translation units
@ 2021-04-04 11:38 rcopley at gmail dot com
  2024-01-17 10:11 ` [Bug libstdc++/99907] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: rcopley at gmail dot com @ 2021-04-04 11:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99907

            Bug ID: 99907
           Summary: (On MS Windows) Multiple definition errors with
                    <coroutine> included in two translation units
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rcopley at gmail dot com
  Target Milestone: ---

Created attachment 50506
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50506&action=edit
testcase

The attached testcase has two translation units main.cpp and coro2.cpp which
both include <coroutine>.

Linking the program with g++ (from the mingw-w64 toolchain built by the MSYS2
project on Microsoft Windows) fails with the following errors:

ld.exe: coro2.o:coro2.cpp:(.text+0x0): multiple definition of
`.weak._ZNSt7__n486122__dummy_resume_destroyEv._ZSt21is_constant_evaluatedv'; 

main.o:main.cpp:(.text+0x0): first defined here

ld.exe: coro2.o:coro2.cpp:(.data+0x0): multiple definition of
`.weak._ZNSt7__n486114__noop_coro_frE._ZSt21is_constant_evaluatedv'; 

main.o:main.cpp:(.data+0x0): first defined here


The issue is present in the versions of <coroutine> in the 10.2 release and the
10.3 release candidate, but not in the current head version in the gcc repo. It
is fixed in this commit:

  94fd05f1f76faca9dc9033b55d44c960155d38e9
  libstdc++: Define noop coroutine details private and inline [PR 95917]

Some discussion here: https://gcc.gnu.org/pipermail/gcc/2021-April/235305.html

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

* [Bug libstdc++/99907] (On MS Windows) Multiple definition errors with <coroutine> included in two translation units
  2021-04-04 11:38 [Bug libstdc++/99907] New: (On MS Windows) Multiple definition errors with <coroutine> included in two translation units rcopley at gmail dot com
@ 2024-01-17 10:11 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2024-01-17 10:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99907

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |11.0
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The GCC 10 release series is no longer supported, so this is fixed in all
supported release series.

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

end of thread, other threads:[~2024-01-17 10:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-04 11:38 [Bug libstdc++/99907] New: (On MS Windows) Multiple definition errors with <coroutine> included in two translation units rcopley at gmail dot com
2024-01-17 10:11 ` [Bug libstdc++/99907] " redi at gcc dot gnu.org

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