From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BD5803952537; Tue, 8 Jun 2021 13:24:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD5803952537 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/91706] [9/10/11/12 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in equate_type_number_to_die, at dwarf2out.c:5782 Date: Tue, 08 Jun 2021 13:24:31 +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.0 X-Bugzilla-Keywords: accepts-invalid, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.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 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, 08 Jun 2021 13:24:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D91706 --- Comment #12 from CVS Commits --- The releases/gcc-11 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:46c1a9f6d03ab444b42c41067597e3fbfba38486 commit r11-8524-g46c1a9f6d03ab444b42c41067597e3fbfba38486 Author: Jason Merrill Date: Fri Apr 16 11:13:40 2021 -0400 c++: alias with same name as base fn [PR91706] This is a bit complex. Looking up c in the definition of D::c finds C::c, OK. Looking up c in the definition of E finds D::c, OK. Since t= he alias is not dependent, we strip it from the template argument, leaving using E =3D A())>; where 'c' still refers to C::c. But instantiating E looks up 'c' again= and finds D::c, which isn't a function, and sadness ensues. I think the bug here is looking up 'c' in D at instantiation time; the declaration we found before is not dependent. This seems to happen bec= ause baselink_for_fns gets BASELINK_BINFO wrong; it is supposed to be the ba= se where lookup found the functions, C in this case. gcc/cp/ChangeLog: PR c++/91706 * semantics.c (baselink_for_fns): Fix BASELINK_BINFO. gcc/testsuite/ChangeLog: PR c++/91706 * g++.dg/template/lookup17.C: New test.=