From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 356AF3858C5F; Wed, 15 Mar 2023 10:49:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 356AF3858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678877390; bh=YEuwBJpuQRQoaPo8TIszBnpVu2udJ7kxm19N5JYGNeQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=L46z5LS3CMqElAAzQklp8PonKULdJvh76BMlGurQB1WJ+bjdyKhC63R98jgM/wvIz 5LauqGffaPVFjLDsBzUmYQ7TeW7sd/35SSg7PiHu0xp1iyunmJDjqLxlv9mez8U02+ /XQ/HomZ/rna2iDDKXJf6pV1Z35DzfPURJD28W5U= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109083] [10/11/12/13 Regression] Incorrect static_assert shown in diagnostics Date: Wed, 15 Mar 2023 10:49:50 +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.1 X-Bugzilla-Keywords: diagnostic, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D109083 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org, | |ppalka at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- What happens is that finish_template_type is called once from unused_functi= on with is_member_function_pointer TEMPLATE_DECL as name and args arg:0 arg:1 > pr109083.ii:86:64 start: pr109083.ii:86:64 finish: pr109083.ii:86:66> pr109083.ii:86:60 start: pr109083.ii:86:60 finish: pr109083.ii:86:66>>> (in my case of reduced preprocessed source), calls lookup_template_class, f= inds nothing in 9943 entry =3D type_specializations->find_with_hash (&elt, hash); and so creates 10082 t =3D make_class_type (TREE_CODE (template_type)); etc. Next time finish_template_type is called from fail_here with the same TEMPLATE_DECL as name and args arg:0 arg:1 > pr109083.ii:92:64 start: pr109083.ii:92:64 finish: pr109083.ii:92:66> pr109083.ii:92:60 start: pr109083.ii:92:60 finish: pr109083.ii:92:66>>> but this type the previously created specialization from unused_function is returned. So, shall template_args_equal or whatever it calls be changed so that it doesn't consider these to be equal? If so, what compilation memory effects will it have?=