From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F03C8385043D; Fri, 18 Jun 2021 07:43:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F03C8385043D From: "nilsgladitz at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101118] New: coroutines: unexpected ODR warning for coroutine frame type in LTO builds Date: Fri, 18 Jun 2021 07:43:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nilsgladitz at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2021 07:43:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101118 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=3D51033&action=3Dedit 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=3Dc++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 =E2=80=98struct _ZN5boost4asio1gIiFviEE2abIiEENS0_9awaitableIiiEET_.frame=E2=80=99 violates= the C++ One Definition Rule [-Wodr] 81 | } | ^ boost.hpp:81:3: note: a different type is defined in another translation un= it 81 | } | ^ boost.hpp:79:34: note: the first difference of corresponding definitions is field =E2=80=98__D.9984.3.4=E2=80=99 79 | template static w ab(k ai) { | ^ boost.hpp:79:34: note: a field with different name is defined in another translation unit 79 | template static w ab(k ai) { |=