public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101118] New: coroutines: unexpected ODR warning for coroutine frame type in LTO builds
@ 2021-06-18  7:43 nilsgladitz at gmail dot com
  2021-06-18 10:26 ` [Bug c++/101118] " rguenth at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: nilsgladitz at gmail dot com @ 2021-06-18  7:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101118
           Summary: coroutines: unexpected ODR warning for coroutine frame
                    type in LTO builds
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nilsgladitz at gmail dot com
  Target Milestone: ---

Created attachment 51033
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51033&action=edit
Testcase source files

The attached sources files are reduced from a C++ project using boost::asio and
coroutines.

I don't fully understand it but compiling them with vanilla GCC 11.1.0 like
this:
g++ -std=c++2a -fPIC -fcoroutines -Wall -flto -fno-fat-lto-objects -shared
foo.cpp bar.cpp

unexpectedly produces the following diagnostic:
boost.hpp:81:3: warning: type ‘struct
_ZN5boost4asio1gIiFviEE2abIiEENS0_9awaitableIiiEET_.frame’ violates the C++ One
Definition Rule [-Wodr]
   81 |   }
      |   ^
boost.hpp:81:3: note: a different type is defined in another translation unit
   81 |   }
      |   ^
boost.hpp:79:34: note: the first difference of corresponding definitions is
field ‘__D.9984.3.4’
   79 |   template <typename k> static w ab(k ai) {
      |                                  ^
boost.hpp:79:34: note: a field with different name is defined in another
translation unit
   79 |   template <typename k> static w ab(k ai) {
      |

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

end of thread, other threads:[~2023-05-16 19:11 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18  7:43 [Bug c++/101118] New: coroutines: unexpected ODR warning for coroutine frame type in LTO builds nilsgladitz at gmail dot com
2021-06-18 10:26 ` [Bug c++/101118] " rguenth at gcc dot gnu.org
2021-06-18 10:46 ` iains at gcc dot gnu.org
2021-06-18 15:18 ` nilsgladitz at gmail dot com
2021-06-18 15:39 ` iains at gcc dot gnu.org
2023-03-03 16:06 ` john at drouhard dot dev
2023-03-03 16:26 ` hubicka at gcc dot gnu.org
2023-03-03 16:33 ` iains at gcc dot gnu.org
2023-03-03 17:06 ` hubicka at ucw dot cz
2023-03-03 17:10 ` iains at gcc dot gnu.org
2023-03-03 19:21 ` iains at gcc dot gnu.org
2023-03-03 19:29 ` iains at gcc dot gnu.org
2023-03-03 20:59 ` iains at gcc dot gnu.org
2023-03-07 12:53 ` hubicka at ucw dot cz
2023-03-07 15:04 ` iains at gcc dot gnu.org
2023-03-07 16:18 ` hubicka at ucw dot cz
2023-03-07 16:27 ` iains at gcc dot gnu.org
2023-04-01  5:28 ` cvs-commit at gcc dot gnu.org
2023-04-30  8:27 ` cvs-commit at gcc dot gnu.org
2023-05-16 19:07 ` cvs-commit at gcc dot gnu.org
2023-05-16 19:11 ` iains 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).