From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 31C89384AB47; Tue, 23 Apr 2024 18:01:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31C89384AB47 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713895311; bh=0M6HI/4dottz4uBrCbBzCf3leHhSjHahU9ek84r7Wog=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iwYgECKKy2q2khxfGp2CYR93K/p+ZFQC6DDFpALLX3SZrFEKPKJpSaFQJgOmbEsiU XC9sYcwrDZ7MEhfC0CbGaf8gzTgAJiVUk89Os6JtSQMVupSZ3oFhEmNE7ztUjOMNsG m9EzGJzX9LrYzRjUQzNADmdDQFJTnzcukbayvYHw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114795] internal compiler error: in finish_member_declaration after module import in gcc 14.0.1 snapshot Date: Tue, 23 Apr 2024 18:01: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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: --- 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=3D114795 --- Comment #8 from GCC Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:4f9401d1a802325e5dfa2db841945e1a9c59a980 commit r14-10096-g4f9401d1a802325e5dfa2db841945e1a9c59a980 Author: Patrick Palka Date: Tue Apr 23 14:01:22 2024 -0400 c++/modules: deduced return type merging [PR114795] When merging an imported function template specialization with an existing one, if the existing one has an undeduced return type and the imported one's is already deduced, we need to propagate the deduced type since once we install the imported definition we won't get a chance to deduce it by normal means. So this patch makes is_matching_decl propagate the deduced return type alongside our propagation of the exception specification. Another option would be to propagate it later when installing the imported definition from read_function_def, but it seems preferable to do it sooner rather than later. PR c++/114795 gcc/cp/ChangeLog: * module.cc (trees_in::is_matching_decl): Propagate deduced function return type. gcc/testsuite/ChangeLog: * g++.dg/modules/auto-4_a.H: New test. * g++.dg/modules/auto-4_b.C: New test. Reviewed-by: Jason Merrill =