From patchwork Fri May 7 10:39:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1475468 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fc6Qq3FW7z9sRK for ; Fri, 7 May 2021 20:40:01 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CBF72383580B; Fri, 7 May 2021 10:39:59 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 26E0C3857C74 for ; Fri, 7 May 2021 10:39:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 26E0C3857C74 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: KBoim/5soyPDCEvEnSoFtDbGRuvw/BIqxm0foWl10Vw1w7+75481Y6cgVQjpDZFXfQ7Gt+O7gc hPdjzv/o9oa0AaMwJ1SQ5SRMSZQcsxR198Zy4mNGmO81Ylj3qXEKOU917OnnzH80dmlkF963kS LSg/YBz3NQ4Bko4mV1miXxV5BuJjX6HGpc2fChSjNUrjBojrIrVSjT88oBDItKikuvIVV4+kj/ nfbPUFSyQqjtBlYUObT4vEQnm6Q/oZ9KCpbu/xD604m1dh4B3hO1DKgsqr7PzJeTJ9ZK2+pXaM yh8= X-IronPort-AV: E=Sophos;i="5.82,280,1613462400"; d="diff'?scan'208";a="60942360" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 07 May 2021 02:39:54 -0800 IronPort-SDR: wSJS6aLQEHpJhPdrM26WFks65+3Hth+HtmaEtyUljSqiyvNDnhiv6hb3QBrq4VIMqJKunyJHd8 hxsqYj5lqRJuS1+SjUdoAGCmjNP1uwd0qBNylcoWBs9CYOcx3hqqk/jNpUlx0YVXXLwNg+r7zk DIp8jddaeG5ybMnADHL3Ew6zwm7d0juEA5jTRbt83/j/dCjmoty1O06nE9q/QR80YuHgifoLoW S5IMUk6Ca36DBcV4miC3iuISCxxhNEFZ3EHIbhv+ITkoiOqIlxQuKCFZPWY9WcHIlPSUQkM2Lr TEM= To: =?utf-8?q?Martin_Li=C5=A1ka?= , gcc-patches From: Tobias Burnus Subject: [Patch] contrib/gcc-changelog: Detect if same file appears twice Message-ID: Date: Fri, 7 May 2021 12:39:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-06.mgc.mentorg.com (139.181.222.6) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Test for a copyed-but-not-fully-edited error. OK? Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf contrib/gcc-changelog: Detect if same file appears twice contrib/ChangeLog: * gcc-changelog/git_commit.py (Error.__repr__): Add space after the colon. (GitCommit.check_mentioned_files): Check whether the same file has been specified multiple times. * gcc-changelog/test_email.py (TestGccChangelog.test_multi_same_file): New. * gcc-changelog/test_patches.txt (0001-OpenMP-Fix-SIMT): New test. diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index b28f7deac23..d9332cb0c38 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -200,7 +200,7 @@ class Error: def __repr__(self): s = self.message if self.line: - s += ':"%s"' % self.line + s += ': "%s"' % self.line return s @@ -629,7 +629,12 @@ class GitCommit: assert not entry.folder.endswith('/') for file in entry.files: if not self.is_changelog_filename(file): - mentioned_files.add(os.path.join(entry.folder, file)) + item = os.path.join(entry.folder, file) + if item in mentioned_files: + msg = 'same file specified multiple times' + self.errors.append(Error(msg, file)) + else: + mentioned_files.add(item) for pattern in entry.file_patterns: mentioned_patterns.append(os.path.join(entry.folder, pattern)) diff --git a/contrib/gcc-changelog/test_email.py b/contrib/gcc-changelog/test_email.py index 8abf5c37487..d66bf5be4eb 100755 --- a/contrib/gcc-changelog/test_email.py +++ b/contrib/gcc-changelog/test_email.py @@ -424,3 +424,7 @@ class TestGccChangelog(unittest.TestCase): def test_long_filenames(self): email = self.from_patch_glob('0001-long-filenames') assert not email.errors + + def test_multi_same_file(self): + email = self.from_patch_glob('0001-OpenMP-Fix-SIMT') + assert email.errors[0].message == 'same file specified multiple times' diff --git a/contrib/gcc-changelog/test_patches.txt b/contrib/gcc-changelog/test_patches.txt index 3f9806dc076..7e4a4b01081 100644 --- a/contrib/gcc-changelog/test_patches.txt +++ b/contrib/gcc-changelog/test_patches.txt @@ -3546,3 +3546,32 @@ index 5ad82db1def..53b15f32516 100644 @@ -1 +1,2 @@ + + +=== 0001-OpenMP-Fix-SIMT === +From 33b647956caa977d1ae489f9baed9cef70b4f382 Mon Sep 17 00:00:00 2001 +From: Tobias Burnus +Date: Fri, 7 May 2021 12:11:51 +0200 +Subject: [PATCH] OpenMP: Fix SIMT for complex/float reduction with && and || + +libgomp/ChangeLog: + + * testsuite/libgomp.c-c++-common/reduction-5.c: New test, testing + complex/floating-point || + && reduction with 'omp target'. + * testsuite/libgomp.c-c++-common/reduction-5.c: Likewise. +--- +diff --git a/libgomp/testsuite/libgomp.c-c++-common/reduction-5.c b/libgomp/testsuite/libgomp.c-c++-common/reduction-5.c +new file mode 100644 +index 00000000000..21540512e23 +--- /dev/null ++++ b/libgomp/testsuite/libgomp.c-c++-common/reduction-5.c +@@ -0,0 +1,1 @@ ++ +diff --git a/libgomp/testsuite/libgomp.c-c++-common/reduction-6.c b/libgomp/testsuite/libgomp.c-c++-common/reduction-6.c +new file mode 100644 +index 00000000000..21540512e23 +--- /dev/null ++++ b/libgomp/testsuite/libgomp.c-c++-common/reduction-6.c +@@ -0,0 +1,1 @@ ++ +-- +2.25.1