From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 81AD93858D3C; Wed, 19 Oct 2022 09:26:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81AD93858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666171585; bh=5NinyyOILVH2t6g/pxXG/YOnR6QXyp7RNxSXPOtq+IE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=M4EPrFVhbaPOH1oP9CSDCCxhYnC0EkzIM78zFuJzEm93j18xz5KLVk2PCvt/g31hh lcV6fleiXds1reBNfN+9mUPV69/TznlAtPreuDFpdVLY+OYqf3DRI7DPOX8F7BRowz TBg60wpCaPkFOls5GWuqoBmuvx/gnYvkPbDagJII= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98662] [10/11/12/13 Regression] checking ICE in friend_accessible_p since r227023 Date: Wed, 19 Oct 2022 09:26:24 +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: 10.2.0 X-Bugzilla-Keywords: ice-checking, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 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=3D98662 --- Comment #7 from Richard Biener --- So is this a rejects-valid as well? The assert suggests the return value a= nd the diagnostic without checking is wrong: > g++-11 t.C -c t.C: In instantiation of 'int f(S)': t.C:16:10: required from here t.C:6:14: error: 'int S::j' is protected within this context 6 | (void) y.j; | ~~^ t.C:12:7: note: declared protected here 12 | int j; | ^=