From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C9DD93857816; Tue, 1 Jun 2021 10:44:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9DD93857816 From: "vopl at bk dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100825] function signature constraints are not a part of mangled name Date: Tue, 01 Jun 2021 10:44:18 +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: ABI, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: vopl at bk dot ru 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 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: Tue, 01 Jun 2021 10:44:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100825 --- Comment #4 from vopl at bk dot ru --- (In reply to Jonathan Wakely from comment #3) > Clang and EDG agree with GCC here. >=20 > I think your code is ill-formed due to [temp.constr.atomic] p3: >=20 > "If, at different points in the program, the satisfaction result is > different for identical atomic constraints and template arguments, the > program is ill-formed, no diagnostic required." Please, take a look at [temp.constr.atomic] p2: Two atomic constraints, e1 = and e2, are identical if they are formed from the same appearance of the same expression and... My code contains two functions (last case, from Comment#1): template void foo() /*empty constraints*/; template void foo() requires true; empty constraints from first functions is not identical "requires true" from second one, so, [temp.constr.atomic] p3 is not applicable here. ------------ Here is a sample with constraints in both functions: template concept C1 =3D sizeof(T) > 1; template concept C2 =3D C1 && sizeof(T) < 24; template void foo() requires C1 {} void useFirst() { foo(); } template void foo() requires C2 {} void useSecond() { foo(); } /tmp/ccZLqFRh.s:69: Error: symbol `_Z3fooIiEvv' is already defined Thanks.=