From patchwork Tue Sep 18 13:31:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrill Tkachov X-Patchwork-Id: 971108 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-485880-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="t7cxHGv5"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42F3mw4vkPz9s4Z for ; Tue, 18 Sep 2018 23:31:41 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=sReeE2msla/ea3oGFQOdCBn0cWIstij06uRVF9iZwQvR7Q sDJLxQMkPw5Vcpdh++M4OQa7mUJW5n2IJ6rgSQzfuq4KrfTF45J5F1QT7Q1c4i21 ZIQ8Nap0u5lvaWMdNXXY5Kq3Jtr16kgS13J2jdH1BXOvt8Dl1DN5BKj+cdllE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=67Nuc9a/fLFZowo2FQobTP1KFEc=; b=t7cxHGv54eBKWIb9CvYr piYkX3OBRtN6s0LF8X+WzdJTJEam2SlFtoVZ0jj+jIfwdEB2XjkjyX0Kuk823azl xfX4pZwfy1TwxtpzmI8KQi4THybLsfL38t4WInmlEFWLYngaeloqGFJLhz3BtTx+ oLddatTJeuLWrz1INvPe3UU= Received: (qmail 37411 invoked by alias); 18 Sep 2018 13:31:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 37288 invoked by uid 89); 18 Sep 2018 13:31:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=spellcheck_4c, UD:spellcheck_1.c, UD:spellcheck_4.c, spellcheck_1.c X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Sep 2018 13:31:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7925EED1 for ; Tue, 18 Sep 2018 06:31:17 -0700 (PDT) Received: from [10.2.207.77] (e100706-lin.cambridge.arm.com [10.2.207.77]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 267013F557 for ; Tue, 18 Sep 2018 06:31:17 -0700 (PDT) Message-ID: <5BA0FE23.70006@foss.arm.com> Date: Tue, 18 Sep 2018 14:31:15 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: [PATCH][AArch64][committed] Fix gcc.target/aarch64/spellcheck_1.c and spellcheck_4.c Hi all, These two tests started failing after commit r264335 that adjusted the cutoff point at which the diagnostic suggestions machinery decides a suggestion is meaningful. For these tests it means we no longer suggest anything as an alternative to "armv8-a-typo" as an "arch=" pargma value. We do still list the valid options, we just don't prefer one particular value over the others. When I first wrote this test it wasn't with a particular architecture suggestion in mind, but rather to test that the suggestion machinery is being sanely invoked. So this patch changes the dg-message check to treat the "did you mean...?" hunk as optional (in case the heuristics in the suggestions machinery change again). With this patch the two tests PASS again on aarch64. Committing to trunk as obvious. Thanks, Kyrill 2018-09-18 Kyrylo Tkachov * gcc.target/aarch64/spellcheck_1.c: Make architecture suggestion optional. * gcc.target/aarch64/spellcheck_4.c: Likewise. diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c index f57e0c5463299ea1c2b369fb00ca3fc005cb567b..a0795c1cc532208fcb04ceefa6877deac4a2d749 100644 --- a/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c +++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c @@ -3,7 +3,7 @@ __attribute__((target ("arch=armv8-a-typo"))) void foo () { - /* { dg-message "valid arguments are: \[^\n\r]*; did you mean 'armv8-a'?" "" { target *-*-* } .-1 } */ + /* { dg-message "valid arguments are: \[^\n\r]*(; did you mean 'armv*'?)?" "" { target *-*-* } .-1 } */ /* { dg-error "invalid name \\(\"armv8-a-typo\"\\) in 'target\\(\"arch=\"\\)' pragma or attribute" "" { target *-*-* } .-2 } */ /* { dg-error "pragma or attribute 'target\\(\"arch=armv8-a-typo\"\\)' is not valid" "" { target *-*-* } .-3 } */ } diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_4.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_4.c index 6f66fdc98e28d32dec46d79747cb31a94e9d7529..37c9d3c4d61607803641a42d24a135d28bf375bb 100644 --- a/gcc/testsuite/gcc.target/aarch64/spellcheck_4.c +++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_4.c @@ -8,4 +8,4 @@ foo () } /* { dg-error "unknown value 'armv8-a-typo' for -march" "" { target *-*-* } 0 } */ -/* { dg-message "valid arguments are: \[^\n\r]*; did you mean 'armv8-a'?" "" { target *-*-* } 0 } */ +/* { dg-message "valid arguments are: \[^\n\r]*(; did you mean 'armv*'?)?" "" { target *-*-* } 0 } */