From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D104A385B1A2; Mon, 28 Nov 2022 09:15:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D104A385B1A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669626917; bh=haBWjKG7rreUvZdMm1QncC8lPEk/GCkEhq9bLrXGsY4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=a2OJgcr2FjXt+2j25gyUG+lc3WLp5OGETrZAFsd8K5T3AM9wOez5wtDtaMdFAv+sZ eybvt4qMFVF0D0Gnws9JpjxRi0dZG4xjIkqXQKqqguINdTlq37dCav087rQPMyrWd8 MI1YpchIQlG8zRhrDHt6Ie6UwkDksz56Bt0df3qc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106875] [11/12/13 Regression] ICE in ix86_emit_outlined_ms2sysv_save with -mabi=ms -mcall-ms2sysv-xlogues and "#pragma GCC target" since r11-3183-gba948b37768c99cd Date: Mon, 28 Nov 2022 09:15:16 +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 #3 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:ee629d242d9f93a38e49bed904bb334bbe15dde1 commit r13-4353-gee629d242d9f93a38e49bed904bb334bbe15dde1 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.cc (ix86_function_specific_save, ix86_function_specific_restore): Don't save and restore x_ix86_= abi. * g++.target/i386/pr106875.C: New test.=