From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4CFCB3849AF2; Tue, 16 Apr 2024 08:57:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CFCB3849AF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713257846; bh=hNxMaieLubH2MZ5KBofzjPk+hWfm8k9YbvNszT2qCjQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iqzCZPoWAU17uYDoTK64yIRuO5Xh4KMXXeK40Ujf/bxMg0ZxHSmkRaVpy07We6n5a 8Wx4IYcj+t+7EZhA1Ov4Pq4TQ4HzVP7s2H6+bSOclopFG9ahjhwfV5KirfHfmlDo9u nsv+zMO8DMhS58tQALZNSqQdZmMthTQlpZSbUGAY= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/113208] [14 Regression] lto1: error: Alias and target's comdat groups differs since r14-5979-g99d114c15523e0 Date: Tue, 16 Apr 2024 08:57:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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=3D113208 --- Comment #29 from Jakub Jelinek --- Looking at t1 (i.e. the reduced testcase with constexpr), the difference wi= th -std=3Dc++20 -O1 -fkeep-inline-functions is that in r14-5978 we used to emit _ZN6vectorI12QualityValueEC2ERKS1_ in _ZN6vectorI12QualityValueEC5ERKS1_ comdat section and _ZN6vectorI12QualityValueEC1ERKS1_ as an alias to it (i.= e. the r0-97383-g24b3ff2c53806d3d optimization), while with r14-5979 we don't opti= mize it any longer, i.e. emit _ZN6vectorI12QualityValueEC2ERKS1_ in _ZN6vectorI12QualityValueEC2ERKS1_ comdat and _ZN6vectorI12QualityValueEC2ERKS1_ in _ZN6vectorI12QualityValueEC2ERKS1_ comdat. I thought that ought to be ABI compatible (the latter is what we used to em= it before r0-97383), all the involved symbols are weak and either linker keeps the pair of symbols with the _ZN6vectorI12QualityValueEC5ERKS1_ comdat, or one or both of the _ZN6vectorI12QualityValueEC[12]ERKS1_ comdats (depending= on if just one or both of those symbols are used), or it keeps all of them and the linker chooses between the 2 symbol definitions one that is actually used. Of course, I'd like to understand why Marek's patch changed the behavior.=