From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 11C38385828D; Fri, 3 Mar 2023 16:26:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11C38385828D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677860772; bh=W6Y3efpqDwZQ71MU4gMJQuFztEYL5DGBfxbnOM0EyCY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CN83dy099/SzmmBDKgOgfTmrst6XG3Rw6jGshkx5XsFx7umjN3sXh4vFMy5oIH+tx RbtWtf5pfmk8J0AOHETZP9yE0Ne6km+JT4E95ZxCgZlJptFDD1I3YmuNBbz/sQeHCY 2EiSr5/BGaVHpCWZE9QarVUnKsKbMAMunLFTZETE= From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101118] coroutines: unexpected ODR warning for coroutine frame type in LTO builds Date: Fri, 03 Mar 2023 16:26:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: C++-coroutines, diagnostic, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org 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: Message-ID: In-Reply-To: References: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101118 --- Comment #6 from Jan Hubicka --- I am not really expert on coroutines. But this seems to be a type (not a declaration we globalize during LTO) generated internally by the front-end.= =20 The name __D.9984.3.4 looks like it has a global counter in it. ODR types are supposed to be literaly the same across units. One way to silence this would be to not make these types ODR types since th= ey are not the usual C++ types anyway. I wonder if this is a part of the cross-unit API that is supposed to be sa= me? I.e. is the coroutine in one compilation unit visible from the other? If so, perhaps the only problem is hte global counter 9984 and if the counts were generated internally for each such type, the ODR handling wlll be happ= y.=