From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DDD1D3858289; Wed, 17 Jan 2024 23:48:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDD1D3858289 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705535333; bh=La1RmmaYvTLv8hRPpIyOynRq5GdyI89T9hOlllWjC6c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=H91tGYiwkkP4fnonDwz2cVH73oAjsJSCrxd2tYJLk1jQGOOY857gITQIBL7dUqpOU YJrCM8UXg6E1GKMPMaNBRCX234wqo8Gfqp10YhfziR3gJonZY3EnmjRf1seDL/V/OL KGQEV1re2vd+T3duFAevOIEAIFqzOJESVrtCCOnU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112588] [modules] ICE in make_decl_rtl when returning str literal when string header imported in module Date: Wed, 17 Jan 2024 23:48:51 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 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=3D112588 --- Comment #4 from GCC Commits --- The master branch has been updated by Nathaniel Shead : https://gcc.gnu.org/g:3471a61ed0ddef70de8f1bbba85cd1e945fc86fd commit r14-8196-g3471a61ed0ddef70de8f1bbba85cd1e945fc86fd Author: Nathaniel Shead Date: Sat Dec 16 21:34:45 2023 +1100 c++: Prevent overwriting arguments when merging duplicates [PR112588] When merging duplicate instantiations of function templates, currently read_function_def overwrites the arguments with that of the existing duplicate. This is problematic, however, since this means that the PARM_DECLs in the body of the function definition no longer match with the PARM_DECLs in the argument list, which causes issues when it comes to generating RTL. There doesn't seem to be any reason to do this replacement, so this patch removes that logic. PR c++/112588 gcc/cp/ChangeLog: * module.cc (trees_in::read_function_def): Don't overwrite arguments. gcc/testsuite/ChangeLog: * g++.dg/modules/merge-16.h: New test. * g++.dg/modules/merge-16_a.C: New test. * g++.dg/modules/merge-16_b.C: New test. Signed-off-by: Nathaniel Shead =