From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 786D238618C9; Tue, 15 Dec 2020 09:17:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 786D238618C9 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/98274] -march=x86-64-v[234] incompatible with target attribute Date: Tue, 15 Dec 2020 09:17:04 +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: 11.0 X-Bugzilla-Keywords: 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: jakub 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2020 09:17:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98274 --- Comment #2 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:69bd5d473d22157d0737fc20e98eb3347cbd6ab5 commit r11-6041-g69bd5d473d22157d0737fc20e98eb3347cbd6ab5 Author: Jakub Jelinek Date: Tue Dec 15 10:16:08 2020 +0100 i386: Fix up -march=3Dx86-64-v[234] vs. target attribute [PR98274] The following testcase fails to compile. The problem is that when ix86_option_override_internal is called the first time for command line, it sees -mtune=3D wasn't present on the command line and so as fa= llback sets ix86_tune_string to ix86_arch_string value ("x86-64-v2"), but ix86_tune_specified is false, so we don't find the tuning in the table but don't error on it. When processing the target attribute, ix86_tune_string is what it was earlier left with, but this time ix86_tune_specified is true and so we error on it. The following patch does what is done already e.g. for "x86-64" march, in particular default the tuning to "generic". 2020-12-15 Jakub Jelinek PR target/98274 * config/i386/i386-options.c (ix86_option_override_internal): S= et ix86_tune_string to "generic" even when it wasn't specified and ix86_arch_string is "x86-64-v2", "x86-64-v3" or "x86-64-v4". Remove useless {}s around a single statement. * gcc.target/i386/pr98274.c: New test.=