From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 159443857C42; Fri, 26 Jan 2024 22:29:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 159443857C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706308172; bh=n9VYHYxvKuWjaFvwMnpW8blajb2UAk+6bcVUF0QYxG8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NhTLuIpfU8EJVMzw9exCre1emerTZgmQ4BaqsOSDe+PyqvfuN8o2GObe01e3LkCAf 3PTkntRZPbCl8+5lSyngqmcQ2TTSkH6mQtwOxBheYc2TEX2jWD8A3JTDAGrLk743FZ T4qGjKjskhFyohxF4/MImSuJOjwdhyfF3iZfx2aQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113580] -Wunused-parameter in template imported from module causes segmentation fault Date: Fri, 26 Jan 2024 22:29: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: 13.2.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=3D113580 --- Comment #1 from GCC Commits --- The master branch has been updated by Nathaniel Shead : https://gcc.gnu.org/g:ec57d183d35412aa5e0bcd7a448ccb75a4e1eab7 commit r14-8462-gec57d183d35412aa5e0bcd7a448ccb75a4e1eab7 Author: Nathaniel Shead Date: Fri Jan 26 16:55:52 2024 +1100 c++: Stream additional fields for DECL_STRUCT_FUNCTION [PR113580] Currently the DECL_STRUCT_FUNCTION for a declaration is always reconstructed from scratch. This causes issues though, as some fields used by other parts of the compiler (in this case, specifically 'function_{start,end}_locus') are then not correctly initialised. This patch makes sure that these fields are also read and written. PR c++/113580 gcc/cp/ChangeLog: * module.cc (struct post_process_data): Create. (trees_in::post_decls): Use. (trees_in::post_process): Return entire vector at once. Change overload to take post_process_data instead of tree. (trees_out::write_function_def): Write needed flags from DECL_STRUCT_FUNCTION. (trees_in::read_function_def): Read them and pass to post_process. (module_state::read_cluster): Write flags into cfun. gcc/testsuite/ChangeLog: * g++.dg/modules/pr113580_a.C: New test. * g++.dg/modules/pr113580_b.C: New test. Signed-off-by: Nathaniel Shead =