From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6CAB3386F83C; Wed, 13 Jan 2021 20:40:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CAB3386F83C From: "ppalka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98662] New: checking ICE in friend_accessible_p since r227023 Date: Wed, 13 Jan 2021 20:40:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Wed, 13 Jan 2021 20:40:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98662 Bug ID: 98662 Summary: checking ICE in friend_accessible_p since r227023 Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ppalka at gcc dot gnu.org Target Milestone: --- $ cat testcase.C template struct S { friend int f(S) { S y; (void) y.i; (void) y.j; return 0; } private: int i; protected: int j; }; extern S s; int a =3D f(s); $ g++ testcase.C testcase.C: In instantiation of =E2=80=98int f(S)=E2=80=99: testcase.C:18:12: required from here=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 testcase.C:8:14: internal compiler error: in friend_accessible_p, at cp/search.c:732 8 | (void) y.j; // { dg-error "protected" }=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 | ~~^=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0x6c4b3c friend_accessible_p=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 /home/patrick/gcc/gcc/cp/search.c:732 0xad439d friend_accessible_p=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 /home/patrick/gcc/gcc/cp/search.c:724 0xad4662 dfs_accessible_post=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 /home/patrick/gcc/gcc/cp/search.c:792 0xad2762 dfs_walk_once_accessible_r=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 /home/patrick/gcc/gcc/cp/search.c:1588 0xad3012 accessible_p(tree_node*, tree_node*, bool)=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 /home/patrick/gcc/gcc/cp/search.c:889 0xad54f3 enforce_access=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 /home/patrick/gcc/gcc/cp/semantics.c:314 0xad5931 perform_or_defer_access_check(tree_node*, tree_node*, tree_node*, = int, access_failure_info*) /home/patrick/gcc/gcc/cp/semantics.c:403 0xad1995 lookup_member(tree_node*, tree_node*, int, bool, int, access_failure_info*) /home/patrick/gcc/gcc/cp/search.c:1176 0xb2bc86 finish_class_member_access_expr(cp_expr, tree_node*, bool, int) /home/patrick/gcc/gcc/cp/typeck.c:3188 ...=