From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 45190385701B; Tue, 2 May 2023 20:12:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45190385701B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683058345; bh=vhoJ8QgJJrSf8cRFaPIKYNShN7q7/iYocgd4pIU7XrY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=npwoRBkcpMWL/P6Hg+zEjxGseHj79l95rhP//3DPRN8204hal0C+9hoO1yxFSsBVd 8IoeiAoKC8G3rfdmK7YddqUErNRp9WG5J4MVRIVoQyAz/agFIJyctCznnTg+cM9v+Z jfSVI9AkYANYKCEkj/JqUorKbttsckBZJo9Twqiw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106875] [11 Regression] ICE in ix86_emit_outlined_ms2sysv_save with -mabi=ms -mcall-ms2sysv-xlogues and "#pragma GCC target" since r11-3183-gba948b37768c99cd Date: Tue, 02 May 2023 20:12:24 +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: 13.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: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 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=3D106875 --- Comment #7 from CVS Commits --- The releases/gcc-11 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:511b878b6a808c3d46dccf806223a851e63ad562 commit r11-10685-g511b878b6a808c3d46dccf806223a851e63ad562 Author: Jakub Jelinek Date: Mon Nov 28 10:13:43 2022 +0100 i386: Fix up ix86_abi handling [PR106875] The following testcase fails since my changes to make also opts_set saved/restored upon function target/optimization changes (before it has been acting as "has this option be ever explicit anywhere?"). The problem is that for ix86_abi we depend on the opts_set value for it in ix86_option_override_internal: SET_OPTION_IF_UNSET (opts, opts_set, ix86_abi, DEFAULT_ABI); but as it is a TargetSave, the backend code is required to save/restore it manually (it does that) and since gcc 11 also to save/restore the opts_set bit for it (which isn't done). We don't do that for various other TargetSave which ix86_function_specific_{save,restore} saves/restores, but as long as we never test opts_set for it, it doesn't really matter. One possible fix would be to introduce some new TargetSave into which ix86_function_specific_{save,restore} would save/restore a bitmask of the opts_set bits. The following patch uses an easier fix, by making it a TargetVariable instead the saving/restoring is handled by the generated code. The differences in options.h are just slight movements on where *ix86_abi stuff appears in it, ditto for options.cc, the real differences are just in options-save.cc, where cl_target_option_save gets: + ptr->x_ix86_abi =3D opts->x_ix86_abi; ... + if (opts_set->x_ix86_abi) mask |=3D HOST_WIDE_INT_1U << 3; (plus adjustments of following TargetVariables mask related stuff), cl_target_option_restore gets: + opts->x_ix86_abi =3D ptr->x_ix86_abi; ... + opts_set->x_ix86_abi =3D static_cast((mask & 1) != =3D 0); + mask >>=3D 1; plus the movements in other functions too. So, by it being a TargetVariable, the only thing that changed is that we don't need to handle it manually in ix86_function_specific_{save,restore} because it is handled automatically including the opts_set stuff. 2022-11-28 Jakub Jelinek PR target/106875 * config/i386/i386.opt (x_ix86_abi): Remove TargetSave. (ix86_abi): Replace it with TargetVariable. * config/i386/i386-options.c (ix86_function_specific_save, ix86_function_specific_restore): Don't save and restore x_ix86_= abi. * g++.target/i386/pr106875.C: New test. (cherry picked from commit ee629d242d9f93a38e49bed904bb334bbe15dde1)=