From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 504F73858D1E; Sun, 6 Nov 2022 21:55:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 504F73858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667771701; bh=mgNq/fz1K3YOrpUDlSzVAmpo9HtsFz66q0p+IkpjUBg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EC1sl3AI9zzhjmkVlFw7l+onPAlcyN8iB580sRN60hlB81LRvnDyaXXhePnfCOyO4 6aCy+8uuhU+fXw2ZhohzvRlEqc74SVk67KB+wZUHR1j62soQyslSRslq538i7P1d/k Au9ctg5WMRVMjAcyINh/O4Hdy9xwfICxUVYuK7uQ= From: "danakj at orodu dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107544] Friended struct with concept gives different output in clang/gcc/MSVC Date: Sun, 06 Nov 2022 21:55:01 +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: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: danakj at orodu dot net 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=3D107544 --- Comment #4 from danakj at orodu dot net --- It looks related but I am not sure it is a duplicate. In this case, the con= cept is being used from a non-friend context first and still accessing the priva= te data. In that bug, they demonstrate clang having the same output, but here clang and GCC differ as well. ``` std::cout << HasTag << "\n"; std::cout << check_tag::value() << "\n"; ``` Reordering these statements does not change the output.=