From patchwork Wed Dec 20 00:18:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sebor X-Patchwork-Id: 851143 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-469621-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="J4HgPW2/"; 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 3z1b3944r7z9s7f for ; Wed, 20 Dec 2017 11:18:27 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=GMOuYV6qeuG7uMahRwSlCqDqfBXsayl3K+6ODot79p8zNOeN4a HYWrokKJWqcCn0aU3cnb+edsYgCZCkKYhMNLRyMWtqSO+LMMPwJPH9+cRWVN0RlB itdYimO72oJ77s97pXPqL7y2VFcuM8YZ4lkInDfqKC82ML1/EQCOiIY8I= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=ZllmWwxTjwJy7nHpGQlx7i/kd3Q=; b=J4HgPW2/QFi513Th+HpM QVzK5xVBBNlH//QMEu5ElXgP6/o7x2G/aa5ivPhBZbhTz2IbwxjLCNbMHP6PRGDW yfgNnRZsgp88z+wkLRXJHl88FiVJ7SP/VfviQKbV2EagM/Y7gTG/8ZDq3x4A98cT HYImYlJlJjoCMjtIHRcofIc= Received: (qmail 15427 invoked by alias); 20 Dec 2017 00:18:19 -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 15418 invoked by uid 89); 20 Dec 2017 00:18:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f41.google.com Received: from mail-oi0-f41.google.com (HELO mail-oi0-f41.google.com) (209.85.218.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Dec 2017 00:18:17 +0000 Received: by mail-oi0-f41.google.com with SMTP id u193so13591108oie.1 for ; Tue, 19 Dec 2017 16:18:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=Q6gHJVuGQ2GMB5hk/BCNwcXWpmGM197INM5LO1v6DSI=; b=bPj6BMtObda2H3xJehJfKBscjvzmejHxWNW5jDFM+WylBBwbwikyQaQmiREdiKlHyk GUWtO1a67IcvaukcC6XdlGJzeorzJRlG8UCHecRJEM5SIM+baUiXjO+1FxzDfEGThPUg fI2VPQL2u2zhr5tKPlnNHI+yxSNk+GuTp0cO8BwQvaozUr4THAuwGqDvMzp9FcGb7S2W U6rVc4cej4z1IL+M0RfJhDuc/udj7HwiN9CASmk6bW0EzuZm0+PAffQ7R0OGbxXBkziT wi1f663Cz9qtpnWvLzGKXiHY96eslyCuF3NC53MqH3VAU+gUOL59aSkaKtEZk6f2el5d wZkw== X-Gm-Message-State: AKGB3mJANOomIhiydWHset/3Cng9ZpAmh0wt+XKdT4JxgXxd9jMQe/ZG ERC9v17XNtg1diulZVMQN5+3RQ== X-Google-Smtp-Source: ACJfBovchNHpBxuCuXYofP2KMk7KZt+Lf9+BruuplKuNuUyUDlfXHinEBtZ20jPuIhtQjV+LhYz2DQ== X-Received: by 10.202.78.10 with SMTP id c10mr3518963oib.337.1513729095749; Tue, 19 Dec 2017 16:18:15 -0800 (PST) Received: from localhost.localdomain (97-118-117-95.hlrn.qwest.net. [97.118.117.95]) by smtp.gmail.com with ESMTPSA id c125sm7140266oia.50.2017.12.19.16.18.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Dec 2017 16:18:14 -0800 (PST) To: Gcc Patch List From: Martin Sebor Subject: [PATCH] skip memcpy-6.c for failing targets (PR 83483) Message-ID: <18ec2f59-0783-2778-1afd-53d51dce7e67@gmail.com> Date: Tue, 19 Dec 2017 17:18:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 X-IsSubscribed: yes As discussed in PR 83483, the gcc.dg/memcpy-6.c test I added along with the -Wrestrict changes fails on many targets because of bad assumptions on my part. The test wasn't quite ready to commit but I forgot to get back to it and finish it up. Rather than remove it, the attached patch skips running it on targets other than x86, the only ones I tested it on. It's known to pass on others (e.g., powerpc64le) so if it's thought useful it can be enabled for those as well. Martin PR testsuite/83483 - [8 Regression] gcc.dg/memcpy-6.c FAILs gcc/testsuite/ChangeLog: PR testsuite/83483 * gcc.dg/memcpy-6.c: Skip for targets other than x86. diff --git a/gcc/testsuite/gcc.dg/memcpy-6.c b/gcc/testsuite/gcc.dg/memcpy-6.c index 1d76e7e..7ff735e 100644 --- a/gcc/testsuite/gcc.dg/memcpy-6.c +++ b/gcc/testsuite/gcc.dg/memcpy-6.c @@ -1,8 +1,12 @@ /* Test to verify that overlapping memcpy with const sizes that are powers of two are folded into into the same code as memmove, but that they - are diagnosed nonetheless. + are diagnosed nonetheless. Whether a call is folded depends on + the size of the copy, the alignment, and wheteber else the target + might decide to consider. The test is only run on a small subset + of targets where it's known to pass (see PR testsuite/83483). { dg-do compile } - { dg-options "-O0 -Wrestrict -fdump-tree-optimized" } */ + { dg-options "-O0 -Wrestrict -fdump-tree-optimized" } + { dg-skip-if "skip non-x86 targets" { ! { i?86-*-* x86_64-*-* } } } */ char a[32];