From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2781A3858C5F; Tue, 12 Dec 2023 04:16:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2781A3858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702354572; bh=GTM5/2q3d3zMSyt3OV725nYNKffZcSNRpevtSaut+QA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IHWgUZVWz6U2UIUQXpcCedGhSJ+ar5B6jdzbqsVeB6bEVVQxhKfyhkC8+qBJpImaY NCV07WqqeI674RUGE+mVSC0sdjTnE+PIZkrsv0X/Wyz8lvH+9j3fuM/+3HEMShNsOO yccCu6wU/RMvFrBNCNM2cDII4WCBev8+zTLTxc3U= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112334] ICE in gen_untyped_return arm.md:9197 while compiling harden-cfr-bret.c Date: Tue, 12 Dec 2023 04:16:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target 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: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: aoliva 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=3D112334 --- Comment #4 from GCC Commits --- The master branch has been updated by Alexandre Oliva : https://gcc.gnu.org/g:d96533559e26dd0c86f0708fa46eef65c35f7b90 commit r14-6446-gd96533559e26dd0c86f0708fa46eef65c35f7b90 Author: Alexandre Oliva Date: Tue Dec 12 01:12:04 2023 -0300 untyped calls: enable target switching [PR112334] The computation of apply_args_size and apply_result_size is saved in a static variable, so that the corresponding _mode arrays are initialized only once. That is not compatible with switchable targets, and ARM's arm_set_current_function, by saving and restoring target globals, exercises this problem with a testcase such as that in the PR, in which more than one function in the translation unit calls __builtin_apply or __builtin_return, respectively. This patch moves the _size statics into the target_builtins array, with a bit of ugliness over _plus_one so that zero initialization of the struct does the right thing. for gcc/ChangeLog PR target/112334 * builtins.h (target_builtins): Add fields for apply_args_size and apply_result_size. * builtins.cc (apply_args_size, apply_result_size): Cache results in fields rather than in static variables. (get_apply_args_size, set_apply_args_size): New. (get_apply_result_size, set_apply_result_size): New.=