gcc-changelog: Handle situations like '* tree-vect-slp.c (): '
authorMartin Liska <mliska@suse.cz>
Fri, 30 Oct 2020 10:23:11 +0000 (11:23 +0100)
committerMartin Liska <mliska@suse.cz>
Fri, 30 Oct 2020 10:24:49 +0000 (11:24 +0100)
contrib/ChangeLog:

* gcc-changelog/git_commit.py: Handle empty groups in
file description.
* gcc-changelog/test_email.py: New test.
* gcc-changelog/test_patches.txt: Likewise.

contrib/gcc-changelog/git_commit.py
contrib/gcc-changelog/test_email.py
contrib/gcc-changelog/test_patches.txt

index 5a9cc4c7563a54ff597e27e63557c4023dcb8eaa..1d0860cddd881f8e634d6390894c25c20f2dc8f7 100755 (executable)
@@ -459,6 +459,13 @@ class GitCommit:
                             msg = 'one space should follow asterisk'
                             self.errors.append(Error(msg, line))
                         else:
+                            content = m.group('content')
+                            parts = content.split(':')
+                            if len(parts) > 1:
+                                for needle in ('()', '[]', '<>'):
+                                    if ' ' + needle in parts[0]:
+                                        msg = f'empty group "{needle}" found'
+                                        self.errors.append(Error(msg, line))
                             last_entry.lines.append(line)
                     else:
                         if last_entry.is_empty:
index b6fbe6a5303b72551e6d5d1d59d7c96db1b83811..98f2ecd258dcdf5e490db8d071fcc95be637f987 100755 (executable)
@@ -365,3 +365,8 @@ class TestGccChangelog(unittest.TestCase):
     def test_square_and_lt_gt(self):
         email = self.from_patch_glob('0001-Check-for-more-missing')
         assert not email.errors
+
+    def test_empty_parenthesis(self):
+        email = self.from_patch_glob('0001-tree-optimization-97633-fix')
+        assert len(email.errors) == 1
+        assert email.errors[0].message == 'empty group "()" found'
index 2bf5d1aefaa0c79b347df0496d4a1ea179efbe83..148d020f23b449abe4b1810821f54a40217f037a 100644 (file)
@@ -3193,5 +3193,46 @@ index fe18288..313f84d 100644
  
 +
 -- 
+=== 0001-tree-optimization-97633-fix-SLP-scheduling-of-single.patch ===
+From c0bfd9672e19caf08e45afeb4277f848488ced2b Mon Sep 17 00:00:00 2001
+From: Richard Biener <rguenther@suse.de>
+Date: Fri, 30 Oct 2020 09:57:02 +0100
+Subject: [PATCH] tree-optimization/97633 - fix SLP scheduling of single-node
+ cycles
+
+This makes sure to update backedges in single-node cycles.
+
+2020-10-30  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/97633
+       * tree-vect-slp.c (): Update backedges in single-node cycles.
+       Optimize processing of externals.
+
+       * g++.dg/vect/slp-pr97636.cc: New testcase.
+       * gcc.dg/vect/bb-slp-pr97633.c: Likewise.
+---
+ gcc/testsuite/g++.dg/vect/slp-pr97636.cc   |  83 +++++++++++
+ gcc/testsuite/gcc.dg/vect/bb-slp-pr97633.c |  27 ++++
+ gcc/tree-vect-slp.c                        | 162 +++++++++++----------
+ 3 files changed, 198 insertions(+), 74 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/vect/slp-pr97636.cc
+ create mode 100644 gcc/testsuite/gcc.dg/vect/bb-slp-pr97633.c
+
+diff --git a/gcc/testsuite/g++.dg/vect/slp-pr97636.cc b/gcc/testsuite/g++.dg/vect/slp-pr97636.cc
+new file mode 100644
+index 00000000000..012342004f1
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/vect/slp-pr97636.cc
+@@ -0,0 +1 @@
++
+diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
+index 5d69a98c2a9..714e50697bd 100644
+--- a/gcc/tree-vect-slp.c
++++ b/gcc/tree-vect-slp.c
+@@ -1 +1,2 @@
++
+-- 
+
 2.7.4