aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-07-11 12:43:49 -0700
committerIan Lance Taylor <iant@golang.org>2020-07-11 12:43:49 -0700
commit4854d721be78358e59367982bdd94461b4be3c5a (patch)
tree8ead189e618f8ef1456c8b02c81de0cc1585d8a6 /contrib
parent3cdc95b9f8d6c90c4a279783fd3da961c5afb22c (diff)
parente109f6e438b72ef3e403162971068d28d09b82f5 (diff)
downloadgcc-4854d721be78358e59367982bdd94461b4be3c5a.zip
gcc-4854d721be78358e59367982bdd94461b4be3c5a.tar.gz
gcc-4854d721be78358e59367982bdd94461b4be3c5a.tar.bz2
Merge from trunk revision e109f6e438b72ef3e403162971068d28d09b82f5
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ChangeLog412
-rwxr-xr-xcontrib/check-params-in-docs.py17
-rwxr-xr-xcontrib/compare-debug26
-rw-r--r--contrib/config-list.mk11
-rw-r--r--contrib/dg-extract-results.py6
-rwxr-xr-xcontrib/dg-extract-results.sh12
-rwxr-xr-xcontrib/download_prerequisites20
-rwxr-xr-xcontrib/gcc-changelog/git_check_commit.py49
-rwxr-xr-xcontrib/gcc-changelog/git_commit.py676
-rwxr-xr-xcontrib/gcc-changelog/git_email.py107
-rwxr-xr-xcontrib/gcc-changelog/git_repository.py78
-rwxr-xr-xcontrib/gcc-changelog/git_update_version.py145
-rwxr-xr-xcontrib/gcc-changelog/test_email.py367
-rw-r--r--contrib/gcc-changelog/test_patches.txt3197
-rwxr-xr-xcontrib/gcc-git-customization.sh16
-rwxr-xr-xcontrib/gcc_update1
-rwxr-xr-xcontrib/git-backport.py65
-rwxr-xr-xcontrib/legacy/mklog (renamed from contrib/mklog)0
-rwxr-xr-xcontrib/legacy/mklog.pl (renamed from contrib/mklog.pl)0
-rwxr-xr-xcontrib/mklog.py261
-rwxr-xr-xcontrib/prepare-commit-msg81
-rwxr-xr-xcontrib/test_mklog.py439
-rw-r--r--contrib/vimrc20
23 files changed, 5978 insertions, 28 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index ab9254b..53578ac 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,415 @@
+2020-07-10 Mike Nolta <mike@nolta.net>
+
+ * download_prerequisites: Don't pass wget options to curl.
+
+2020-07-07 Alexandre Oliva <oliva@adacore.com>
+ Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Support CASE and COND.
+ * gcc-changelog/test_patches.txt: Add test.
+ * gcc-changelog/test_email.py: Add test.
+
+2020-06-30 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_repository.py: Support older releases of
+ GitPython when renamed_file was named renamed.
+
+2020-06-30 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_check_commit.py: Print revision
+ of original_info.
+ * gcc-changelog/git_commit.py: Support Revert commits.
+
+2020-06-30 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_check_commit.py: Use GitInfo
+ * gcc-changelog/git_commit.py: Add GitInfo class.
+ * gcc-changelog/git_email.py: Use GitInfo class.
+ * gcc-changelog/git_repository.py: Likewise.
+
+2020-06-24 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ * download_prerequisites: Support AIX and OpenBSD unames.
+ Pipe `{gzip,bzip2} -d` to `tar -xf -`.
+
+2020-06-18 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_update_version.py: First checkout and then
+ run git pull ---rebase.
+
+2020-06-18 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_update_version.py: Support merge commits
+ and walk only on the branch that is being merged and generate
+ missing ChangeLog entries.
+
+2020-06-18 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Fix Backported from timestamp when
+ use_commit_ts=True is used.
+
+2020-06-17 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Print 'Backported from master'
+ heading to backported commits.
+ * gcc-changelog/test_email.py: Test it.
+ * gcc-changelog/test_patches.txt: Add new patch.
+ * gcc-changelog/git_repository.py: Add commit_to_date hook.
+ * gcc-changelog/git_email.py: Add fuzzy implementation
+ of commit_to_date_hook.
+
+2020-06-11 Jonathan Wakely <jwakely@redhat.com>
+
+ * prepare-commit-msg: Use the gcc-config.mklog-hook-type Git
+ config key instead of the GCC_FORCE_MKLOG environment variable.
+ Optionally disable generating a new ChangeLog template for
+ amended commits when the existing log is still OK.
+
+2020-06-11 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_update_version.py: Add --curent argument.
+
+2020-06-11 Martin Liska <mliska@suse.cz>
+
+ * prepare-commit-msg: Replace ENV variable with a git config
+ value.
+
+2020-06-11 Jonathan Wakely <jwakely@redhat.com>
+
+ * prepare-commit-msg: Use 'tee' to save the diff to a file
+ instead of running 'git diff' twice.
+
+2020-06-10 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Fix renamed files in
+ parse_git_name_status.
+ * gcc-changelog/test_email.py: Add test for it.
+
+2020-06-10 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Add more supported prefixes.
+ * gcc-changelog/test_email.py: Fix one flake8 error.
+ * gcc-changelog/test_patches.txt: Add tested for newly
+ supported prefixes.
+
+2020-06-10 Jonathan Wakely <jwakely@redhat.com>
+
+ * gcc-changelog/git_commit.py (GitCommit.parse_changelog):
+ Improve error strings.
+ * gcc-changelog/test_email.py: Update expected errors.
+
+2020-06-09 Jonathan Wakely <jwakely@redhat.com>
+
+ * gcc-changelog/git_email.py: Set exit status on error.
+
+2020-06-09 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Fix ChangeLog regex in order to
+ match the top-level ChangeLog.
+ * gcc-changelog/test_email.py: Add test.
+ * gcc-changelog/test_patches.txt: Likewise.
+
+2020-06-02 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Support foo/bar/*: patterns in
+ wildcard_prefixes locations.
+ * gcc-changelog/test_email.py: Test it.
+ * gcc-changelog/test_patches.txt: Add 3 new patches.
+
+2020-06-02 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * gcc-changelog/git_commit.py (ignored_prefixes): Add
+ gcc/testsuite/gdc.test/.
+
+2020-06-02 Jonathan Wakely <jwakely@redhat.com>
+
+ * gcc-changelog/test_email.py (TestGccChangelog.test_long_lines):
+ Update expected error message.
+
+2020-06-02 Jonathan Wakely <jwakely@redhat.com>
+
+ * gcc-changelog/git_commit.py (GitCommit.parse_changelog): Fix
+ grammar.
+
+2020-06-02 Jonathan Wakely <jwakely@redhat.com>
+
+ * prepare-commit-msg: Do nothing if the mklog.py script isn't
+ present.
+
+2020-06-02 Jonathan Wakely <jwakely@redhat.com>
+
+ * gcc-changelog/git_commit.py (GitCommit.check_mentioned_files):
+ Improve error text.
+
+2020-05-31 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * config-list.mk (LIST): Add v850e1-elf.
+
+2020-05-31 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * config-list.mk (LIST): Add or1k-elf, or1k-linux-*, and or1k-rtems.
+
+2020-05-31 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * config-list.mk (LIST): Remove arm-wrs-vxworks.
+
+2020-05-31 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * config-list.mk (LIST): Remove cris-linux, crisv32-elf, and
+ crisv32-linux.
+
+2020-05-31 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * config-list.mk (LIST): Add pru-elf.
+
+2020-05-29 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * config-list.mk (LIST): Remove rs6000-ibm-aix5.3.0.
+
+2020-05-29 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Find empty change descriptions.
+ * gcc-changelog/test_email.py: New test.
+ * gcc-changelog/test_patches.txt: New patch that tests that.
+
+2020-05-29 Martin Liska <mliska@suse.cz>
+
+ * git-backport.py: The script did 'git co HEAD~' when
+ there was no modified ChangeLog file in a successful
+ git cherry pick.
+ Run cherry-pick --continue without editor.
+
+2020-05-29 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Properly
+ handle duplicite authors.
+ * gcc-changelog/test_email.py: New test.
+ * gcc-changelog/test_patches.txt: New patch.
+
+2020-05-28 Pierre-Marie de Rodat <derodat@adacore.com>
+
+ * gcc-changelog/git_email.py (GitEmail.__init__): Interpret file
+ renamings as a file deletion plus a file addition.
+ * gcc-changelog/git_repository.py (parse_git_revisions):
+ Likewise.
+ * gcc-changelog/test_email.py: New testcase.
+ * gcc-changelog/test_patches.txt: New testcase.
+
+2020-05-28 Martin Liska <mliska@suse.cz>
+
+ * check-params-in-docs.py: Update to new format
+ of help. Apply flake8 corrections.
+
+2020-05-28 Martin Liska <mliska@suse.cz>
+
+ * mklog.py: Support renaming of files.
+ One needs unidiff 0.6.0+.
+ * test_mklog.py: Test it.
+
+2020-05-27 Martin Liska <mliska@suse.cz>
+
+ * gcc-git-customization.sh: Use git-backport.py to drop
+ all changes for ChangeLog files.
+ * git-backport.py: New file.
+
+2020-05-27 Martin Liska <mliska@suse.cz>
+
+ * gcc-git-customization.sh: Rename
+ commit-mklog to gcc-commit-mklog.
+
+2020-05-27 Martin Liska <mliska@suse.cz>
+
+ * prepare-commit-msg: Save diff to a file if
+ the GCC_GIT_DIFF_FILE variable is set.
+
+2020-05-26 Pierre-Marie de Rodat <derodat@adacore.com>
+
+ * gcc-changelog/git_commit.py (ChangeLogEntry): Handle entries
+ with multi-line file lists.
+ * gcc-changelog/test_email.py: New testcase.
+ * gcc-changelog/test_patches.txt: Likewise.
+
+2020-05-26 Pierre-Marie de Rodat <derodat@adacore.com>
+
+ * gcc-changelog/git_update_version.py: Close file objects after
+ use.
+ * gcc-changelog/git_email.py: Likewise.
+ * gcc-changelog/test_email.py: Likewise.
+
+2020-05-26 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_update_version.py: Add 2 new options.
+
+2020-05-26 Alexandre Oliva <oliva@gnu.org>
+
+ * gcc-changelog/git_commit.py (changelog_regex): Accept optional
+ 'for' prefix.
+
+2020-05-26 Alexandre Oliva <oliva@adacore.com>
+
+ * compare-debug: Adjust for .gkd files named as dump files,
+ with the source suffix rather than the object suffix.
+
+2020-05-26 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Parse changelog entries for
+ ignored locations.
+ * gcc-changelog/test_email.py: Add new test for it.
+ * gcc-changelog/test_patches.txt: Likewise.
+
+2020-05-26 Jason Merrill <jason@redhat.com>
+
+ * prepare-commit-msg: New file.
+ * gcc-git-customization.sh: Install it. Add commit-mklog alias.
+ * mklog.py: Add new option -c which appends
+ to a ChangeLog file.
+
+2020-05-25 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Add trailing '/'
+ for libdruntime. Allow empty changelog for
+ only ignored files.
+ * gcc-changelog/test_email.py: New test for go
+ patch in ignored location.
+ * gcc-changelog/test_patches.txt: Add test.
+
+2020-05-22 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc-changelog/git_commit.py: Add trailing / to
+ gcc/testsuite/go.test/test and replace gcc/go/frontend/
+ with gcc/go/gofrontend/ in ignored locations.
+
+2020-05-22 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Add gcc/testsuite/go.test/test
+ to ignored locations.
+
+2020-05-21 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_update_version.py: Prepare the script, the
+ only missing piece is pushing of the updated branches.
+
+2020-05-21 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Support DR entries/
+ * gcc-changelog/test_email.py: New test for it.
+ * gcc-changelog/test_patches.txt: New patch for it.
+
+2020-05-21 Martin Liska <mliska@suse.cz>
+
+ * mklog.py: Support DR parsing.
+ * test_mklog.py: New test for DR parsing.
+
+2020-05-20 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Add author_tuple
+ only if not present in author_lines.
+ * gcc-changelog/test_email.py: New test.
+ * gcc-changelog/test_patches.txt: Add new patch.
+
+2020-05-20 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Refactor to make flake8 happy.
+ * gcc-changelog/test_email.py: Add new test.
+ * gcc-changelog/test_patches.txt: Add new patch.
+
+2020-05-20 Frederik Harwath <frederik@codesourcery.com>
+
+ * gcc-changelog/git_commit.py: Skip over lines starting
+ with "Reviewed-by: ", "Reviewed-on: ", or "Signed-off-by: "
+
+2020-05-20 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_check_commit.py: Change
+ --allow-non-strict-mode to --non-strict-mode.
+
+2020-05-20 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Support cherry pick
+ prefix.
+ * gcc-changelog/test_email.py: Test it.
+ * gcc-changelog/test_patches.txt: Add new patch.
+ * gcc-git-customization.sh: Add gcc-backport.
+
+2020-05-19 Martin Liska <mliska@suse.cz>
+
+ * mklog.py: Use REST API for bug title downloading.
+
+2020-05-19 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Add param use_commit_ts
+ for to_changelog_entries.
+ * gcc-changelog/git_update_version.py: Se use_commit_ts to True.
+
+2020-05-19 Martin Liska <mliska@suse.cz>
+
+ * mklog.py: Skip GTY for struct names. Make flake8 happy.
+ * test_mklog.py: Add test for GTY.
+
+2020-05-19 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_update_version.py:
+ Fill up entries in reverse order.
+
+2020-05-19 Martin Liska <mliska@suse.cz>
+
+ * gcc-git-customization.sh: Add
+ alias.gcc-mklog new hook.
+ * mklog.py: New file.
+ * test_mklog.py: New file.
+
+2020-05-19 Martin Liska <mliska@suse.cz>
+
+ * legacy/mklog: Moved from mklog.
+ * legacy/mklog.pl: Moved from mklog.pl.
+
+2020-05-19 Martin Liska <mliska@suse.cz>
+
+ * gcc-git-customization.sh: Add gcc-verify alias
+ that uses contrib/gcc-changelog/git_check_commit.py.
+
+2020-05-15 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * dg-extract-results.py: Handle GDB specific test types.
+ * dg-extract-results.sh: Likewise.
+
+2020-05-14 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/test_email.py: New file.
+ * gcc-changelog/test_patches.txt: New file.
+
+2020-05-13 Patrick Palka <ppalka@redhat.com>
+
+ * vimrc: Reduce textwidth to 72 for Git commit messages.
+
+2020-05-13 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_check_commit.py: Add default argument HEAD
+ for revisions and improve error message output.
+
+2020-05-13 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Restore print_output syntax
+ in git_commit.py.
+
+2020-05-13 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_check_commit.py: New file.
+ * gcc-changelog/git_commit.py: New file.
+ * gcc-changelog/git_email.py: New file.
+ * gcc-changelog/git_repository.py: New file.
+ * gcc-changelog/git_update_version.py: New file.
+
+2020-04-17 Martin Liska <mliska@suse.cz>
+
+ * vimrc: We do not want to modify tab options
+ for Python files.
+
+2020-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/92008
+ * gcc_update: Add intl/plural.y dependency for intl/plural-config.h.
+
2020-04-03 Martin Liska <mliska@suse.cz>
* gcc-git-customization.sh: Search for the pattern
diff --git a/contrib/check-params-in-docs.py b/contrib/check-params-in-docs.py
index 6cff090..dfbfa3d 100755
--- a/contrib/check-params-in-docs.py
+++ b/contrib/check-params-in-docs.py
@@ -22,16 +22,19 @@
#
#
-import sys
-import json
import argparse
+from itertools import dropwhile, takewhile
-from itertools import *
def get_param_tuple(line):
- line = line.strip()
+ line = line.strip().replace('--param=', '')
i = line.find(' ')
- return (line[:i], line[i:].strip())
+ name = line[:i]
+ if '=' in name:
+ name = name[:name.find('=')]
+ description = line[i:].strip()
+ return (name, description)
+
parser = argparse.ArgumentParser()
parser.add_argument('texi_file')
@@ -49,8 +52,8 @@ for line in open(args.params_output).readlines():
# Find section in .texi manual with parameters
texi = ([x.strip() for x in open(args.texi_file).readlines()])
-texi = dropwhile(lambda x: not 'item --param' in x, texi)
-texi = takewhile(lambda x: not '@node Instrumentation Options' in x, texi)
+texi = dropwhile(lambda x: 'item --param' not in x, texi)
+texi = takewhile(lambda x: '@node Instrumentation Options' not in x, texi)
texi = list(texi)[1:]
token = '@item '
diff --git a/contrib/compare-debug b/contrib/compare-debug
index 22870cf..cf80ae3 100755
--- a/contrib/compare-debug
+++ b/contrib/compare-debug
@@ -2,7 +2,7 @@
# Compare stripped copies of two given object files.
-# Copyright (C) 2007, 2008, 2009, 2010, 2012 Free Software Foundation
+# Copyright (C) 2007, 2008, 2009, 2010, 2012, 2020 Free Software Foundation
# Originally by Alexandre Oliva <aoliva@redhat.com>
# This file is part of GCC.
@@ -183,8 +183,28 @@ $rm "$1.$suf1" "$2.$suf2"
trap "exit $status; exit" 0 1 2 15
-if test -f "$1".gkd || test -f "$2".gkd; then
- if cmp "$1".gkd "$2".gkd; then
+# Replace the suffix in $1 and $2 with .*.gkd, compare them if a
+# single file is found by the globbing.
+base1=`echo "$1" | sed '$s,\.[^.]*$,,'` gkd1=
+for f in "$base1".*.gkd; do
+ if test "x$gkd1" != x; then
+ gkd1=
+ break
+ elif test -f "$f"; then
+ gkd1=$f
+ fi
+done
+base2=`echo "$2" | sed '$s,\.[^.]*$,,'` gkd2=
+for f in "$base2".*.gkd; do
+ if test "x$gkd2" != x; then
+ gkd2=
+ break
+ elif test -f "$f"; then
+ gkd2=$f
+ fi
+done
+if test "x$gkd1" != x || test "x$gkd2" != x; then
+ if cmp "${gkd1-/dev/null}" "${gkd2-/dev/null}"; then
:
else
status=$?
diff --git a/contrib/config-list.mk b/contrib/config-list.mk
index d154286..5818f7d 100644
--- a/contrib/config-list.mk
+++ b/contrib/config-list.mk
@@ -29,19 +29,18 @@ GCC_SRC_DIR=../../gcc
# > make.out 2>&1 &
#
-# v850e1-elf is rejected by config.sub
LIST = aarch64-elf aarch64-linux-gnu aarch64-rtems \
alpha-linux-gnu alpha-netbsd alpha-openbsd \
alpha64-dec-vms alpha-dec-vms \
amdgcn-amdhsa \
arc-elf32OPT-with-cpu=arc600 arc-elf32OPT-with-cpu=arc700 \
arc-linux-uclibcOPT-with-cpu=arc700 arceb-linux-uclibcOPT-with-cpu=arc700 \
- arm-wrs-vxworks arm-netbsdelf \
+ arm-netbsdelf \
arm-linux-androideabi arm-uclinux_eabi arm-eabi arm-rtems \
arm-symbianelf avr-elf \
bfin-elf bfin-uclinux bfin-linux-uclibc bfin-rtems bfin-openbsd \
bpf-unknown-none \
- c6x-elf c6x-uclinux cr16-elf cris-elf cris-linux crisv32-elf crisv32-linux \
+ c6x-elf c6x-uclinux cr16-elf cris-elf \
csky-elf csky-linux-gnu \
epiphany-elf epiphany-elfOPT-with-stack-offset=16 fido-elf \
fr30-elf frv-elf frv-linux ft32-elf h8300-elf hppa-linux-gnu \
@@ -72,6 +71,7 @@ LIST = aarch64-elf aarch64-linux-gnu aarch64-rtems \
nds32le-elf nds32be-elf \
nios2-elf nios2-linux-gnu nios2-rtems \
nvptx-none \
+ or1k-elf or1k-linux-uclibc or1k-linux-musl or1k-rtems \
pdp11-aout \
powerpc-darwin8 \
powerpc-darwin7 powerpc64-darwin powerpc-freebsd6 powerpc-netbsd \
@@ -82,8 +82,9 @@ LIST = aarch64-elf aarch64-linux-gnu aarch64-rtems \
powerpc-wrs-vxworks powerpc-wrs-vxworksae powerpc-wrs-vxworksmils \
powerpc-lynxos powerpcle-elf \
powerpcle-eabisim powerpcle-eabi \
+ pru-elf \
riscv32-unknown-linux-gnu riscv64-unknown-linux-gnu \
- rs6000-ibm-aix5.3.0 rs6000-ibm-aix6.1 rs6000-ibm-aix7.1 \
+ rs6000-ibm-aix6.1 rs6000-ibm-aix7.1 \
rl78-elf rx-elf s390-linux-gnu s390x-linux-gnu s390x-ibm-tpf sh-elf \
shle-linux sh-netbsdelf sh-superh-elf \
sh-rtems sh-wrs-vxworks sparc-elf \
@@ -93,7 +94,7 @@ LIST = aarch64-elf aarch64-linux-gnu aarch64-rtems \
sparc-wrs-vxworks sparc64-elf sparc64-rtems sparc64-linux sparc64-freebsd6 \
sparc64-netbsd sparc64-openbsd \
tilegx-linux-gnu tilegxbe-linux-gnu tilepro-linux-gnu \
- v850e-elf v850-elf v850-rtems vax-linux-gnu \
+ v850e1-elf v850e-elf v850-elf v850-rtems vax-linux-gnu \
vax-netbsdelf vax-openbsd visium-elf x86_64-apple-darwin \
x86_64-pc-linux-gnuOPT-with-fpmath=avx \
x86_64-elfOPT-with-fpmath=sse x86_64-freebsd6 x86_64-netbsd \
diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py
index 7100794..30aa687 100644
--- a/contrib/dg-extract-results.py
+++ b/contrib/dg-extract-results.py
@@ -117,7 +117,7 @@ class Prog:
self.tool_re = re.compile (r'^\t\t=== (.*) tests ===$')
self.result_re = re.compile (r'^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED'
r'|WARNING|ERROR|UNSUPPORTED|UNTESTED'
- r'|KFAIL|KPASS):\s*(.+)')
+ r'|KFAIL|KPASS|PATH|DUPLICATE):\s*(.+)')
self.completed_re = re.compile (r'.* completed at (.*)')
# Pieces of text to write at the head of the output.
# start_line is a pair in which the first element is a datetime
@@ -143,7 +143,9 @@ class Prog:
'# of known failures\t\t',
'# of untested testcases\t\t',
'# of unresolved testcases\t',
- '# of unsupported tests\t\t'
+ '# of unsupported tests\t\t',
+ '# of paths in test names\t',
+ '# of duplicate test names\t'
]
self.runs = dict()
diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh
index f948088..ff6c50d 100755
--- a/contrib/dg-extract-results.sh
+++ b/contrib/dg-extract-results.sh
@@ -326,7 +326,7 @@ BEGIN {
}
}
/^\t\t=== .* ===$/ { curvar = ""; next }
-/^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED|WARNING|ERROR|UNSUPPORTED|UNTESTED|KFAIL|KPASS):/ {
+/^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED|WARNING|ERROR|UNSUPPORTED|UNTESTED|KFAIL|KPASS|PATH|DUPLICATE):/ {
testname=\$2
# Ugly hack for gfortran.dg/dg.exp
if ("$TOOL" == "gfortran" && testname ~ /^gfortran.dg\/g77\//)
@@ -400,6 +400,7 @@ BEGIN {
variant="$VAR"
tool="$TOOL"
passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kpasscnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0; dgerrorcnt=0;
+ pathcnt=0; dupcnt=0
curvar=""; insummary=0
}
/^Running target / { curvar = \$3; next }
@@ -414,6 +415,8 @@ BEGIN {
/^# of untested testcases/ { if (insummary == 1) untstcnt += \$5; next; }
/^# of unresolved testcases/ { if (insummary == 1) unrescnt += \$5; next; }
/^# of unsupported tests/ { if (insummary == 1) unsupcnt += \$5; next; }
+/^# of paths in test names/ { if (insummary == 1) pathcnt += \$7; next; }
+/^# of duplicate test names/ { if (insummary == 1) dupcnt += \$6; next; }
/^$/ { if (insummary == 1)
{ insummary = 0; curvar = "" }
next
@@ -431,6 +434,8 @@ END {
if (untstcnt != 0) printf ("# of untested testcases\t\t%d\n", untstcnt)
if (unrescnt != 0) printf ("# of unresolved testcases\t%d\n", unrescnt)
if (unsupcnt != 0) printf ("# of unsupported tests\t\t%d\n", unsupcnt)
+ if (pathcnt != 0) printf ("# of paths in test names\t%d\n", pathcnt)
+ if (dupcnt != 0) printf ("# of duplicate test names\t%d\n", dupcnt)
}
EOF
@@ -452,6 +457,7 @@ cat << EOF > $TOTAL_AWK
BEGIN {
tool="$TOOL"
passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0; dgerrorcnt=0
+ pathcnt=0; dupcnt=0
}
/^# of DejaGnu errors/ { dgerrorcnt += \$5 }
/^# of expected passes/ { passcnt += \$5 }
@@ -463,6 +469,8 @@ BEGIN {
/^# of untested testcases/ { untstcnt += \$5 }
/^# of unresolved testcases/ { unrescnt += \$5 }
/^# of unsupported tests/ { unsupcnt += \$5 }
+/^# of paths in test names/ { pathcnt += \$7 }
+/^# of duplicate test names/ { dupcnt += \$6 }
END {
printf ("\n\t\t=== %s Summary ===\n\n", tool)
if (dgerrorcnt != 0) printf ("# of DejaGnu errors\t\t%d\n", dgerrorcnt)
@@ -475,6 +483,8 @@ END {
if (untstcnt != 0) printf ("# of untested testcases\t\t%d\n", untstcnt)
if (unrescnt != 0) printf ("# of unresolved testcases\t%d\n", unrescnt)
if (unsupcnt != 0) printf ("# of unsupported tests\t\t%d\n", unsupcnt)
+ if (pathcnt != 0) printf ("# of paths in test names\t%d\n", pathcnt)
+ if (dupcnt != 0) printf ("# of duplicate test names\t%d\n", dupcnt)
}
EOF
diff --git a/contrib/download_prerequisites b/contrib/download_prerequisites
index aa0356e6..7d0c4b5 100755
--- a/contrib/download_prerequisites
+++ b/contrib/download_prerequisites
@@ -47,9 +47,12 @@ force=0
OS=$(uname)
case $OS in
- "Darwin"|"FreeBSD"|"DragonFly")
+ "Darwin"|"FreeBSD"|"DragonFly"|"AIX")
chksum='shasum -a 512 --check'
;;
+ "OpenBSD")
+ chksum='sha512 -c'
+ ;;
*)
chksum='sha512sum -c'
;;
@@ -219,7 +222,7 @@ for ar in $(echo_archives)
do
if [ ${force} -gt 0 ]; then rm -f "${directory}/${ar}"; fi
[ -e "${directory}/${ar}" ] \
- || ${fetch} --no-verbose -O "${directory}/${ar}" "${base_url}${ar}" \
+ || ( cd "${directory}" && ${fetch} --no-verbose "${base_url}${ar}" ) \
|| die "Cannot download ${ar} from ${base_url}"
done
unset ar
@@ -242,8 +245,19 @@ for ar in $(echo_archives)
do
package="${ar%.tar*}"
if [ ${force} -gt 0 ]; then rm -rf "${directory}/${package}"; fi
+ case $ar in
+ *.gz)
+ uncompress='gzip -d'
+ ;;
+ *.bz2)
+ uncompress='bzip2 -d'
+ ;;
+ *)
+ uncompress='cat'
+ ;;
+ esac
[ -e "${directory}/${package}" ] \
- || ( cd "${directory}" && tar -xf "${ar}" ) \
+ || ( cd "${directory}" && $uncompress <"${ar}" | tar -xf - ) \
|| die "Cannot extract package from ${ar}"
unset package
done
diff --git a/contrib/gcc-changelog/git_check_commit.py b/contrib/gcc-changelog/git_check_commit.py
new file mode 100755
index 0000000..935425e
--- /dev/null
+++ b/contrib/gcc-changelog/git_check_commit.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python3
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3, or (at your option) any later
+# version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>. */
+
+import argparse
+
+from git_repository import parse_git_revisions
+
+parser = argparse.ArgumentParser(description='Check git ChangeLog format '
+ 'of a commit')
+parser.add_argument('revisions', default='HEAD', nargs='?',
+ help='Git revisions (e.g. hash~5..hash or just hash)')
+parser.add_argument('-g', '--git-path', default='.',
+ help='Path to git repository')
+parser.add_argument('-p', '--print-changelog', action='store_true',
+ help='Print final changelog entires')
+parser.add_argument('-n', '--non-strict-mode', action='store_true',
+ help='Use non-strict mode (allow changes in ChangeLog and '
+ 'other automatically updated files).')
+args = parser.parse_args()
+
+retval = 0
+for git_commit in parse_git_revisions(args.git_path, args.revisions,
+ not args.non_strict_mode):
+ res = 'OK' if git_commit.success else 'FAILED'
+ print('Checking %s: %s' % (git_commit.original_info.hexsha, res))
+ if git_commit.success:
+ if args.print_changelog:
+ git_commit.print_output()
+ else:
+ for error in git_commit.errors:
+ print('ERR: %s' % error)
+ retval = 1
+
+exit(retval)
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
new file mode 100755
index 0000000..827976c
--- /dev/null
+++ b/contrib/gcc-changelog/git_commit.py
@@ -0,0 +1,676 @@
+#!/usr/bin/env python3
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3, or (at your option) any later
+# version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>. */
+
+import os
+import re
+
+changelog_locations = set([
+ 'config',
+ 'contrib',
+ 'contrib/header-tools',
+ 'contrib/reghunt',
+ 'contrib/regression',
+ 'fixincludes',
+ 'gcc/ada',
+ 'gcc/analyzer',
+ 'gcc/brig',
+ 'gcc/c',
+ 'gcc/c-family',
+ 'gcc',
+ 'gcc/cp',
+ 'gcc/d',
+ 'gcc/fortran',
+ 'gcc/go',
+ 'gcc/jit',
+ 'gcc/lto',
+ 'gcc/objc',
+ 'gcc/objcp',
+ 'gcc/po',
+ 'gcc/testsuite',
+ 'gnattools',
+ 'gotools',
+ 'include',
+ 'intl',
+ 'libada',
+ 'libatomic',
+ 'libbacktrace',
+ 'libcc1',
+ 'libcpp',
+ 'libcpp/po',
+ 'libdecnumber',
+ 'libffi',
+ 'libgcc',
+ 'libgcc/config/avr/libf7',
+ 'libgcc/config/libbid',
+ 'libgfortran',
+ 'libgomp',
+ 'libhsail-rt',
+ 'libiberty',
+ 'libitm',
+ 'libobjc',
+ 'liboffloadmic',
+ 'libphobos',
+ 'libquadmath',
+ 'libsanitizer',
+ 'libssp',
+ 'libstdc++-v3',
+ 'libvtv',
+ 'lto-plugin',
+ 'maintainer-scripts',
+ 'zlib'])
+
+bug_components = set([
+ 'ada',
+ 'analyzer',
+ 'boehm-gc',
+ 'bootstrap',
+ 'c',
+ 'c++',
+ 'd',
+ 'debug',
+ 'demangler',
+ 'driver',
+ 'fastjar',
+ 'fortran',
+ 'gcov-profile',
+ 'go',
+ 'hsa',
+ 'inline-asm',
+ 'ipa',
+ 'java',
+ 'jit',
+ 'libbacktrace',
+ 'libf2c',
+ 'libffi',
+ 'libfortran',
+ 'libgcc',
+ 'libgcj',
+ 'libgomp',
+ 'libitm',
+ 'libobjc',
+ 'libquadmath',
+ 'libstdc++',
+ 'lto',
+ 'middle-end',
+ 'modula2',
+ 'objc',
+ 'objc++',
+ 'other',
+ 'pch',
+ 'pending',
+ 'plugins',
+ 'preprocessor',
+ 'regression',
+ 'rtl-optimization',
+ 'sanitizer',
+ 'spam',
+ 'target',
+ 'testsuite',
+ 'translation',
+ 'tree-optimization',
+ 'web'])
+
+ignored_prefixes = [
+ 'gcc/d/dmd/',
+ 'gcc/go/gofrontend/',
+ 'gcc/testsuite/gdc.test/',
+ 'gcc/testsuite/go.test/test/',
+ 'libgo/',
+ 'libphobos/libdruntime/',
+ 'libphobos/src/',
+ 'libsanitizer/',
+ ]
+
+wildcard_prefixes = [
+ 'gcc/testsuite/',
+ 'libstdc++-v3/doc/html/'
+ ]
+
+misc_files = [
+ 'gcc/DATESTAMP',
+ 'gcc/BASE-VER',
+ 'gcc/DEV-PHASE'
+ ]
+
+author_line_regex = \
+ re.compile(r'^(?P<datetime>\d{4}-\d{2}-\d{2})\ {2}(?P<name>.* <.*>)')
+additional_author_regex = re.compile(r'^\t(?P<spaces>\ *)?(?P<name>.* <.*>)')
+changelog_regex = re.compile(r'^(?:[fF]or +)?([a-z0-9+-/]*)ChangeLog:?')
+pr_regex = re.compile(r'\tPR (?P<component>[a-z+-]+\/)?([0-9]+)$')
+dr_regex = re.compile(r'\tDR ([0-9]+)$')
+star_prefix_regex = re.compile(r'\t\*(?P<spaces>\ *)(?P<content>.*)')
+end_of_location_regex = re.compile(r'[\[<(:]')
+
+LINE_LIMIT = 100
+TAB_WIDTH = 8
+CO_AUTHORED_BY_PREFIX = 'co-authored-by: '
+CHERRY_PICK_PREFIX = '(cherry picked from commit '
+REVERT_PREFIX = 'This reverts commit '
+
+REVIEW_PREFIXES = ('reviewed-by: ', 'reviewed-on: ', 'signed-off-by: ',
+ 'acked-by: ', 'tested-by: ', 'reported-by: ',
+ 'suggested-by: ')
+DATE_FORMAT = '%Y-%m-%d'
+
+
+class Error:
+ def __init__(self, message, line=None):
+ self.message = message
+ self.line = line
+
+ def __repr__(self):
+ s = self.message
+ if self.line:
+ s += ':"%s"' % self.line
+ return s
+
+
+class ChangeLogEntry:
+ def __init__(self, folder, authors, prs):
+ self.folder = folder
+ # The 'list.copy()' function is not available before Python 3.3
+ self.author_lines = list(authors)
+ self.initial_prs = list(prs)
+ self.prs = list(prs)
+ self.lines = []
+ self.files = []
+ self.file_patterns = []
+
+ def parse_file_names(self):
+ # Whether the content currently processed is between a star prefix the
+ # end of the file list: a colon or an open paren.
+ in_location = False
+
+ for line in self.lines:
+ # If this line matches the star prefix, start the location
+ # processing on the information that follows the star.
+ m = star_prefix_regex.match(line)
+ if m:
+ in_location = True
+ line = m.group('content')
+
+ if in_location:
+ # Strip everything that is not a filename in "line":
+ # entities "(NAME)", cases "<PATTERN>", conditions
+ # "[COND]", entry text (the colon, if present, and
+ # anything that follows it).
+ m = end_of_location_regex.search(line)
+ if m:
+ line = line[:m.start()]
+ in_location = False
+
+ # At this point, all that's left is a list of filenames
+ # separated by commas and whitespaces.
+ for file in line.split(','):
+ file = file.strip()
+ if file:
+ if file.endswith('*'):
+ self.file_patterns.append(file[:-1])
+ else:
+ self.files.append(file)
+
+ @property
+ def datetime(self):
+ for author in self.author_lines:
+ if author[1]:
+ return author[1]
+ return None
+
+ @property
+ def authors(self):
+ return [author_line[0] for author_line in self.author_lines]
+
+ @property
+ def is_empty(self):
+ return not self.lines and self.prs == self.initial_prs
+
+ def contains_author(self, author):
+ for author_lines in self.author_lines:
+ if author_lines[0] == author:
+ return True
+ return False
+
+
+class GitInfo:
+ def __init__(self, hexsha, date, author, lines, modified_files):
+ self.hexsha = hexsha
+ self.date = date
+ self.author = author
+ self.lines = lines
+ self.modified_files = modified_files
+
+
+class GitCommit:
+ def __init__(self, info, strict=True, commit_to_info_hook=None):
+ self.original_info = info
+ self.info = info
+ self.message = None
+ self.changes = None
+ self.changelog_entries = []
+ self.errors = []
+ self.top_level_authors = []
+ self.co_authors = []
+ self.top_level_prs = []
+ self.cherry_pick_commit = None
+ self.revert_commit = None
+ self.commit_to_info_hook = commit_to_info_hook
+
+ # Identify first if the commit is a Revert commit
+ for line in self.info.lines:
+ if line.startswith(REVERT_PREFIX):
+ self.revert_commit = line[len(REVERT_PREFIX):].rstrip('.')
+ break
+ if self.revert_commit:
+ self.info = self.commit_to_info_hook(self.revert_commit)
+
+ project_files = [f for f in self.info.modified_files
+ if self.is_changelog_filename(f[0])
+ or f[0] in misc_files]
+ ignored_files = [f for f in self.info.modified_files
+ if self.in_ignored_location(f[0])]
+ if len(project_files) == len(self.info.modified_files):
+ # All modified files are only MISC files
+ return
+ elif project_files and strict:
+ self.errors.append(Error('ChangeLog, DATESTAMP, BASE-VER and '
+ 'DEV-PHASE updates should be done '
+ 'separately from normal commits'))
+ return
+
+ all_are_ignored = (len(project_files) + len(ignored_files)
+ == len(self.info.modified_files))
+ self.parse_lines(all_are_ignored)
+ if self.changes:
+ self.parse_changelog()
+ self.parse_file_names()
+ self.check_for_empty_description()
+ self.deduce_changelog_locations()
+ self.check_file_patterns()
+ if not self.errors:
+ self.check_mentioned_files()
+ self.check_for_correct_changelog()
+
+ @property
+ def success(self):
+ return not self.errors
+
+ @property
+ def new_files(self):
+ return [x[0] for x in self.info.modified_files if x[1] == 'A']
+
+ @classmethod
+ def is_changelog_filename(cls, path):
+ return path.endswith('/ChangeLog') or path == 'ChangeLog'
+
+ @classmethod
+ def find_changelog_location(cls, name):
+ if name.startswith('\t'):
+ name = name[1:]
+ if name.endswith(':'):
+ name = name[:-1]
+ if name.endswith('/'):
+ name = name[:-1]
+ return name if name in changelog_locations else None
+
+ @classmethod
+ def format_git_author(cls, author):
+ assert '<' in author
+ return author.replace('<', ' <')
+
+ @classmethod
+ def parse_git_name_status(cls, string):
+ modified_files = []
+ for entry in string.split('\n'):
+ parts = entry.split('\t')
+ t = parts[0]
+ if t == 'A' or t == 'D' or t == 'M':
+ modified_files.append((parts[1], t))
+ elif t.startswith('R'):
+ modified_files.append((parts[1], 'D'))
+ modified_files.append((parts[2], 'A'))
+ return modified_files
+
+ def parse_lines(self, all_are_ignored):
+ body = self.info.lines
+
+ for i, b in enumerate(body):
+ if not b:
+ continue
+ if (changelog_regex.match(b) or self.find_changelog_location(b)
+ or star_prefix_regex.match(b) or pr_regex.match(b)
+ or dr_regex.match(b) or author_line_regex.match(b)):
+ self.changes = body[i:]
+ return
+ if not all_are_ignored:
+ self.errors.append(Error('cannot find a ChangeLog location in '
+ 'message'))
+
+ def parse_changelog(self):
+ last_entry = None
+ will_deduce = False
+ for line in self.changes:
+ if not line:
+ if last_entry and will_deduce:
+ last_entry = None
+ continue
+ if line != line.rstrip():
+ self.errors.append(Error('trailing whitespace', line))
+ if len(line.replace('\t', ' ' * TAB_WIDTH)) > LINE_LIMIT:
+ self.errors.append(Error('line exceeds %d character limit'
+ % LINE_LIMIT, line))
+ m = changelog_regex.match(line)
+ if m:
+ last_entry = ChangeLogEntry(m.group(1).rstrip('/'),
+ self.top_level_authors,
+ self.top_level_prs)
+ self.changelog_entries.append(last_entry)
+ elif self.find_changelog_location(line):
+ last_entry = ChangeLogEntry(self.find_changelog_location(line),
+ self.top_level_authors,
+ self.top_level_prs)
+ self.changelog_entries.append(last_entry)
+ else:
+ author_tuple = None
+ pr_line = None
+ if author_line_regex.match(line):
+ m = author_line_regex.match(line)
+ author_tuple = (m.group('name'), m.group('datetime'))
+ elif additional_author_regex.match(line):
+ m = additional_author_regex.match(line)
+ if len(m.group('spaces')) != 4:
+ msg = 'additional author must be indented with '\
+ 'one tab and four spaces'
+ self.errors.append(Error(msg, line))
+ else:
+ author_tuple = (m.group('name'), None)
+ elif pr_regex.match(line):
+ component = pr_regex.match(line).group('component')
+ if not component:
+ self.errors.append(Error('missing PR component', line))
+ continue
+ elif not component[:-1] in bug_components:
+ self.errors.append(Error('invalid PR component', line))
+ continue
+ else:
+ pr_line = line.lstrip()
+ elif dr_regex.match(line):
+ pr_line = line.lstrip()
+
+ lowered_line = line.lower()
+ if lowered_line.startswith(CO_AUTHORED_BY_PREFIX):
+ name = line[len(CO_AUTHORED_BY_PREFIX):]
+ author = self.format_git_author(name)
+ self.co_authors.append(author)
+ continue
+ elif lowered_line.startswith(REVIEW_PREFIXES):
+ continue
+ elif line.startswith(CHERRY_PICK_PREFIX):
+ commit = line[len(CHERRY_PICK_PREFIX):].rstrip(')')
+ self.cherry_pick_commit = commit
+ continue
+
+ # ChangeLog name will be deduced later
+ if not last_entry:
+ if author_tuple:
+ self.top_level_authors.append(author_tuple)
+ continue
+ elif pr_line:
+ # append to top_level_prs only when we haven't met
+ # a ChangeLog entry
+ if (pr_line not in self.top_level_prs
+ and not self.changelog_entries):
+ self.top_level_prs.append(pr_line)
+ continue
+ else:
+ last_entry = ChangeLogEntry(None,
+ self.top_level_authors,
+ self.top_level_prs)
+ self.changelog_entries.append(last_entry)
+ will_deduce = True
+ elif author_tuple:
+ if not last_entry.contains_author(author_tuple[0]):
+ last_entry.author_lines.append(author_tuple)
+ continue
+
+ if not line.startswith('\t'):
+ err = Error('line should start with a tab', line)
+ self.errors.append(err)
+ elif pr_line:
+ last_entry.prs.append(pr_line)
+ else:
+ m = star_prefix_regex.match(line)
+ if m:
+ if len(m.group('spaces')) != 1:
+ msg = 'one space should follow asterisk'
+ self.errors.append(Error(msg, line))
+ else:
+ last_entry.lines.append(line)
+ else:
+ if last_entry.is_empty:
+ msg = 'first line should start with a tab, ' \
+ 'an asterisk and a space'
+ self.errors.append(Error(msg, line))
+ else:
+ last_entry.lines.append(line)
+
+ def parse_file_names(self):
+ for entry in self.changelog_entries:
+ entry.parse_file_names()
+
+ def check_file_patterns(self):
+ for entry in self.changelog_entries:
+ for pattern in entry.file_patterns:
+ name = os.path.join(entry.folder, pattern)
+ if name not in wildcard_prefixes:
+ msg = 'unsupported wildcard prefix'
+ self.errors.append(Error(msg, name))
+
+ def check_for_empty_description(self):
+ for entry in self.changelog_entries:
+ for i, line in enumerate(entry.lines):
+ if (star_prefix_regex.match(line) and line.endswith(':') and
+ (i == len(entry.lines) - 1
+ or star_prefix_regex.match(entry.lines[i + 1]))):
+ msg = 'missing description of a change'
+ self.errors.append(Error(msg, line))
+
+ def get_file_changelog_location(self, changelog_file):
+ for file in self.info.modified_files:
+ if file[0] == changelog_file:
+ # root ChangeLog file
+ return ''
+ index = file[0].find('/' + changelog_file)
+ if index != -1:
+ return file[0][:index]
+ return None
+
+ def deduce_changelog_locations(self):
+ for entry in self.changelog_entries:
+ if not entry.folder:
+ changelog = None
+ for file in entry.files:
+ location = self.get_file_changelog_location(file)
+ if (location == ''
+ or (location and location in changelog_locations)):
+ if changelog and changelog != location:
+ msg = 'could not deduce ChangeLog file, ' \
+ 'not unique location'
+ self.errors.append(Error(msg))
+ return
+ changelog = location
+ if changelog is not None:
+ entry.folder = changelog
+ else:
+ msg = 'could not deduce ChangeLog file'
+ self.errors.append(Error(msg))
+
+ @classmethod
+ def in_ignored_location(cls, path):
+ for ignored in ignored_prefixes:
+ if path.startswith(ignored):
+ return True
+ return False
+
+ @classmethod
+ def get_changelog_by_path(cls, path):
+ components = path.split('/')
+ while components:
+ if '/'.join(components) in changelog_locations:
+ break
+ components = components[:-1]
+ return '/'.join(components)
+
+ def check_mentioned_files(self):
+ folder_count = len([x.folder for x in self.changelog_entries])
+ assert folder_count == len(self.changelog_entries)
+
+ mentioned_files = set()
+ mentioned_patterns = []
+ used_patterns = set()
+ for entry in self.changelog_entries:
+ if not entry.files:
+ msg = 'no files mentioned for ChangeLog in directory'
+ self.errors.append(Error(msg, entry.folder))
+ 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))
+ for pattern in entry.file_patterns:
+ mentioned_patterns.append(os.path.join(entry.folder, pattern))
+
+ cand = [x[0] for x in self.info.modified_files
+ if not self.is_changelog_filename(x[0])]
+ changed_files = set(cand)
+ for file in sorted(mentioned_files - changed_files):
+ msg = 'unchanged file mentioned in a ChangeLog'
+ self.errors.append(Error(msg, file))
+ for file in sorted(changed_files - mentioned_files):
+ if not self.in_ignored_location(file):
+ if file in self.new_files:
+ changelog_location = self.get_changelog_by_path(file)
+ # Python2: we cannot use next(filter(...))
+ entries = filter(lambda x: x.folder == changelog_location,
+ self.changelog_entries)
+ entries = list(entries)
+ entry = entries[0] if entries else None
+ if not entry:
+ prs = self.top_level_prs
+ if not prs:
+ # if all ChangeLog entries have identical PRs
+ # then use them
+ prs = self.changelog_entries[0].prs
+ for entry in self.changelog_entries:
+ if entry.prs != prs:
+ prs = []
+ break
+ entry = ChangeLogEntry(changelog_location,
+ self.top_level_authors,
+ prs)
+ self.changelog_entries.append(entry)
+ # strip prefix of the file
+ assert file.startswith(entry.folder)
+ file = file[len(entry.folder):].lstrip('/')
+ entry.lines.append('\t* %s: New file.' % file)
+ entry.files.append(file)
+ else:
+ used_pattern = [p for p in mentioned_patterns
+ if file.startswith(p)]
+ used_pattern = used_pattern[0] if used_pattern else None
+ if used_pattern:
+ used_patterns.add(used_pattern)
+ else:
+ msg = 'changed file not mentioned in a ChangeLog'
+ self.errors.append(Error(msg, file))
+
+ for pattern in mentioned_patterns:
+ if pattern not in used_patterns:
+ error = 'pattern doesn''t match any changed files'
+ self.errors.append(Error(error, pattern))
+
+ def check_for_correct_changelog(self):
+ for entry in self.changelog_entries:
+ for file in entry.files:
+ full_path = os.path.join(entry.folder, file)
+ changelog_location = self.get_changelog_by_path(full_path)
+ if changelog_location != entry.folder:
+ msg = 'wrong ChangeLog location "%s", should be "%s"'
+ err = Error(msg % (entry.folder, changelog_location), file)
+ self.errors.append(err)
+
+ @classmethod
+ def format_authors_in_changelog(cls, authors, timestamp, prefix=''):
+ output = ''
+ for i, author in enumerate(authors):
+ if i == 0:
+ output += '%s%s %s\n' % (prefix, timestamp, author)
+ else:
+ output += '%s\t %s\n' % (prefix, author)
+ output += '\n'
+ return output
+
+ def to_changelog_entries(self, use_commit_ts=False):
+ current_timestamp = self.info.date.strftime(DATE_FORMAT)
+ for entry in self.changelog_entries:
+ output = ''
+ timestamp = entry.datetime
+ if self.cherry_pick_commit:
+ info = self.commit_to_info_hook(self.cherry_pick_commit)
+ # it can happen that it is a cherry-pick for a different
+ # repository
+ if info:
+ timestamp = info.date.strftime(DATE_FORMAT)
+ else:
+ timestamp = current_timestamp
+ elif self.revert_commit:
+ timestamp = current_timestamp
+ orig_date = self.original_info.date
+ current_timestamp = orig_date.strftime(DATE_FORMAT)
+ elif not timestamp or use_commit_ts:
+ timestamp = current_timestamp
+ authors = entry.authors if entry.authors else [self.info.author]
+ # add Co-Authored-By authors to all ChangeLog entries
+ for author in self.co_authors:
+ if author not in authors:
+ authors.append(author)
+
+ if self.cherry_pick_commit or self.revert_commit:
+ output += self.format_authors_in_changelog([self.info.author],
+ current_timestamp)
+ if self.cherry_pick_commit:
+ output += '\tBackported from master:\n'
+ else:
+ output += '\tRevert:\n'
+ output += self.format_authors_in_changelog(authors,
+ timestamp, '\t')
+ else:
+ output += self.format_authors_in_changelog(authors, timestamp)
+ for pr in entry.prs:
+ output += '\t%s\n' % pr
+ for line in entry.lines:
+ output += line + '\n'
+ yield (entry.folder, output.rstrip())
+
+ def print_output(self):
+ for entry, output in self.to_changelog_entries():
+ print('------ %s/ChangeLog ------ ' % entry)
+ print(output)
+
+ def print_errors(self):
+ print('Errors:')
+ for error in self.errors:
+ print(error)
diff --git a/contrib/gcc-changelog/git_email.py b/contrib/gcc-changelog/git_email.py
new file mode 100755
index 0000000..014fdd1
--- /dev/null
+++ b/contrib/gcc-changelog/git_email.py
@@ -0,0 +1,107 @@
+#!/usr/bin/env python3
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3, or (at your option) any later
+# version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>. */
+
+import os
+import sys
+from itertools import takewhile
+
+from dateutil.parser import parse
+
+from git_commit import GitCommit, GitInfo
+
+from unidiff import PatchSet
+
+DATE_PREFIX = 'Date: '
+FROM_PREFIX = 'From: '
+
+
+class GitEmail(GitCommit):
+ def __init__(self, filename, strict=False):
+ self.filename = filename
+ diff = PatchSet.from_filename(filename)
+ date = None
+ author = None
+
+ with open(self.filename, 'r') as f:
+ lines = f.read().splitlines()
+ lines = list(takewhile(lambda line: line != '---', lines))
+ for line in lines:
+ if line.startswith(DATE_PREFIX):
+ date = parse(line[len(DATE_PREFIX):])
+ elif line.startswith(FROM_PREFIX):
+ author = GitCommit.format_git_author(line[len(FROM_PREFIX):])
+ header = list(takewhile(lambda line: line != '', lines))
+ body = lines[len(header) + 1:]
+
+ modified_files = []
+ for f in diff:
+ # Strip "a/" and "b/" prefixes
+ source = f.source_file[2:]
+ target = f.target_file[2:]
+
+ if f.is_added_file:
+ t = 'A'
+ elif f.is_removed_file:
+ t = 'D'
+ elif f.is_rename:
+ # Consider that renamed files are two operations: the deletion
+ # of the original name and the addition of the new one.
+ modified_files.append((source, 'D'))
+ t = 'A'
+ else:
+ t = 'M'
+ modified_files.append((target, t))
+ git_info = GitInfo(None, date, author, body, modified_files)
+ super().__init__(git_info, strict=strict,
+ commit_to_info_hook=lambda x: None)
+
+
+# With zero arguments, process every patch file in the ./patches directory.
+# With one argument, process the named patch file.
+# Patch files must be in 'git format-patch' format.
+if __name__ == '__main__':
+ if len(sys.argv) == 1:
+ allfiles = []
+ for root, _dirs, files in os.walk('patches'):
+ for f in files:
+ full = os.path.join(root, f)
+ allfiles.append(full)
+
+ success = 0
+ for full in sorted(allfiles):
+ email = GitEmail(full, False)
+ print(email.filename)
+ if email.success:
+ success += 1
+ print(' OK')
+ else:
+ for error in email.errors:
+ print(' ERR: %s' % error)
+
+ print()
+ print('Successfully parsed: %d/%d' % (success, len(allfiles)))
+ else:
+ email = GitEmail(sys.argv[1], False)
+ if email.success:
+ print('OK')
+ email.print_output()
+ else:
+ if not email.info.lines:
+ print('Error: patch contains no parsed lines', file=sys.stderr)
+ email.print_errors()
+ sys.exit(1)
diff --git a/contrib/gcc-changelog/git_repository.py b/contrib/gcc-changelog/git_repository.py
new file mode 100755
index 0000000..90edc3c
--- /dev/null
+++ b/contrib/gcc-changelog/git_repository.py
@@ -0,0 +1,78 @@
+#!/usr/bin/env python3
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3, or (at your option) any later
+# version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>. */
+
+from datetime import datetime
+
+try:
+ from git import Repo
+except ImportError:
+ print('Cannot import GitPython package, please install the package:')
+ print(' Fedora, openSUSE: python3-GitPython')
+ print(' Debian, Ubuntu: python3-git')
+ exit(1)
+
+from git_commit import GitCommit, GitInfo
+
+
+def parse_git_revisions(repo_path, revisions, strict=False):
+ repo = Repo(repo_path)
+
+ def commit_to_info(commit):
+ try:
+ c = repo.commit(commit)
+ diff = repo.commit(commit + '~').diff(commit)
+
+ modified_files = []
+ for file in diff:
+ if hasattr(file, 'renamed_file'):
+ is_renamed = file.renamed_file
+ else:
+ is_renamed = file.renamed
+ if file.new_file:
+ t = 'A'
+ elif file.deleted_file:
+ t = 'D'
+ elif is_renamed:
+ # Consider that renamed files are two operations:
+ # the deletion of the original name
+ # and the addition of the new one.
+ modified_files.append((file.a_path, 'D'))
+ t = 'A'
+ else:
+ t = 'M'
+ modified_files.append((file.b_path, t))
+
+ date = datetime.utcfromtimestamp(c.committed_date)
+ author = '%s <%s>' % (c.author.name, c.author.email)
+ git_info = GitInfo(c.hexsha, date, author,
+ c.message.split('\n'), modified_files)
+ return git_info
+ except ValueError:
+ return None
+
+ parsed_commits = []
+ if '..' in revisions:
+ commits = list(repo.iter_commits(revisions))
+ else:
+ commits = [repo.commit(revisions)]
+
+ for commit in commits:
+ git_commit = GitCommit(commit_to_info(commit.hexsha), strict=strict,
+ commit_to_info_hook=commit_to_info)
+ parsed_commits.append(git_commit)
+ return parsed_commits
diff --git a/contrib/gcc-changelog/git_update_version.py b/contrib/gcc-changelog/git_update_version.py
new file mode 100755
index 0000000..ac1b206
--- /dev/null
+++ b/contrib/gcc-changelog/git_update_version.py
@@ -0,0 +1,145 @@
+#!/usr/bin/env python3
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3, or (at your option) any later
+# version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>. */
+
+import argparse
+import datetime
+import os
+
+from git import Repo
+
+from git_repository import parse_git_revisions
+
+current_timestamp = datetime.datetime.now().strftime('%Y%m%d\n')
+
+
+def read_timestamp(path):
+ with open(path) as f:
+ return f.read()
+
+
+def prepend_to_changelog_files(repo, folder, git_commit, add_to_git):
+ if not git_commit.success:
+ for error in git_commit.errors:
+ print(error)
+ raise AssertionError()
+ for entry, output in git_commit.to_changelog_entries(use_commit_ts=True):
+ full_path = os.path.join(folder, entry, 'ChangeLog')
+ print('writting to %s' % full_path)
+ if os.path.exists(full_path):
+ with open(full_path) as f:
+ content = f.read()
+ else:
+ content = ''
+ with open(full_path, 'w+') as f:
+ f.write(output)
+ if content:
+ f.write('\n\n')
+ f.write(content)
+ if add_to_git:
+ repo.git.add(full_path)
+
+
+active_refs = ['master', 'releases/gcc-8', 'releases/gcc-9', 'releases/gcc-10']
+
+parser = argparse.ArgumentParser(description='Update DATESTAMP and generate '
+ 'ChangeLog entries')
+parser.add_argument('-g', '--git-path', default='.',
+ help='Path to git repository')
+parser.add_argument('-p', '--push', action='store_true',
+ help='Push updated active branches')
+parser.add_argument('-d', '--dry-mode',
+ help='Generate patch for ChangeLog entries and do it'
+ ' even if DATESTAMP is unchanged; folder argument'
+ ' is expected')
+parser.add_argument('-c', '--current', action='store_true',
+ help='Modify current branch (--push argument is ignored)')
+args = parser.parse_args()
+
+repo = Repo(args.git_path)
+origin = repo.remotes['origin']
+
+
+def update_current_branch():
+ commit = repo.head.commit
+ commit_count = 1
+ while commit:
+ if (commit.author.email == 'gccadmin@gcc.gnu.org'
+ and commit.message.strip() == 'Daily bump.'):
+ break
+ # We support merge commits but only with 2 parensts
+ assert len(commit.parents) <= 2
+ commit = commit.parents[-1]
+ commit_count += 1
+
+ print('%d revisions since last Daily bump' % commit_count)
+ datestamp_path = os.path.join(args.git_path, 'gcc/DATESTAMP')
+ if (read_timestamp(datestamp_path) != current_timestamp
+ or args.dry_mode or args.current):
+ head = repo.head.commit
+ # if HEAD is a merge commit, start with second parent
+ # (branched that is being merged into the current one)
+ assert len(head.parents) <= 2
+ if len(head.parents) == 2:
+ head = head.parents[1]
+ commits = parse_git_revisions(args.git_path, '%s..%s'
+ % (commit.hexsha, head.hexsha))
+ for git_commit in reversed(commits):
+ prepend_to_changelog_files(repo, args.git_path, git_commit,
+ not args.dry_mode)
+ if args.dry_mode:
+ diff = repo.git.diff('HEAD')
+ patch = os.path.join(args.dry_mode,
+ branch.name.split('/')[-1] + '.patch')
+ with open(patch, 'w+') as f:
+ f.write(diff)
+ print('branch diff written to %s' % patch)
+ repo.git.checkout(force=True)
+ else:
+ # update timestamp
+ print('DATESTAMP will be changed:')
+ with open(datestamp_path, 'w+') as f:
+ f.write(current_timestamp)
+ repo.git.add(datestamp_path)
+ if not args.current:
+ repo.index.commit('Daily bump.')
+ if args.push:
+ repo.git.push('origin', branch)
+ print('branch is pushed')
+ else:
+ print('DATESTAMP unchanged')
+
+
+if args.current:
+ print('=== Working on the current branch ===', flush=True)
+ update_current_branch()
+else:
+ for ref in origin.refs:
+ assert ref.name.startswith('origin/')
+ name = ref.name[len('origin/'):]
+ if name in active_refs:
+ if name in repo.branches:
+ branch = repo.branches[name]
+ else:
+ branch = repo.create_head(name, ref).set_tracking_branch(ref)
+ print('=== Working on: %s ===' % branch, flush=True)
+ branch.checkout()
+ origin.pull(rebase=True)
+ print('branch pulled and checked out')
+ update_current_branch()
+ assert not repo.index.diff(None)
+ print('branch is done\n', flush=True)
diff --git a/contrib/gcc-changelog/test_email.py b/contrib/gcc-changelog/test_email.py
new file mode 100755
index 0000000..b6fbe6a
--- /dev/null
+++ b/contrib/gcc-changelog/test_email.py
@@ -0,0 +1,367 @@
+#!/usr/bin/env python3
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3, or (at your option) any later
+# version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>. */
+
+import os
+import tempfile
+import unittest
+
+from git_commit import GitCommit
+
+from git_email import GitEmail
+
+import unidiff
+
+script_path = os.path.dirname(os.path.realpath(__file__))
+
+unidiff_supports_renaming = hasattr(unidiff.PatchedFile(), 'is_rename')
+
+
+NAME_STATUS1 = """
+M gcc/ada/impunit.adb'
+R097 gcc/ada/libgnat/s-atopar.adb gcc/ada/libgnat/s-aoinar.adb
+"""
+
+
+class TestGccChangelog(unittest.TestCase):
+ def setUp(self):
+ self.patches = {}
+ self.temps = []
+
+ filename = None
+ patch_lines = []
+ with open(os.path.join(script_path, 'test_patches.txt')) as f:
+ lines = f.read()
+ for line in lines.split('\n'):
+ if line.startswith('==='):
+ if patch_lines:
+ self.patches[filename] = patch_lines
+ filename = line.split(' ')[1]
+ patch_lines = []
+ else:
+ patch_lines.append(line)
+ if patch_lines:
+ self.patches[filename] = patch_lines
+
+ def tearDown(self):
+ for t in self.temps:
+ assert t.endswith('.patch')
+ os.remove(t)
+
+ def get_git_email(self, filename, strict=False):
+ with tempfile.NamedTemporaryFile(mode='w+', suffix='.patch',
+ delete=False) as f:
+ f.write('\n'.join(self.patches[filename]))
+ self.temps.append(f.name)
+ return GitEmail(f.name, strict)
+
+ def from_patch_glob(self, name, strict=False):
+ files = [f for f in self.patches.keys() if f.startswith(name)]
+ assert len(files) == 1
+ return self.get_git_email(files[0], strict)
+
+ def test_simple_patch_format(self):
+ email = self.get_git_email('0577-aarch64-Add-an-and.patch')
+ assert not email.errors
+ assert len(email.changelog_entries) == 2
+ entry = email.changelog_entries[0]
+ assert (entry.author_lines ==
+ [('Richard Sandiford <richard.sandiford@arm.com>',
+ '2020-02-06')])
+ assert len(entry.authors) == 1
+ assert (entry.authors[0]
+ == 'Richard Sandiford <richard.sandiford@arm.com>')
+ assert entry.folder == 'gcc'
+ assert entry.prs == ['PR target/87763']
+ assert len(entry.files) == 3
+ assert entry.files[0] == 'config/aarch64/aarch64-protos.h'
+
+ def test_daily_bump(self):
+ email = self.get_git_email('0085-Daily-bump.patch')
+ assert not email.errors
+ assert not email.changelog_entries
+
+ def test_deduce_changelog_entries(self):
+ email = self.from_patch_glob('0040')
+ assert len(email.changelog_entries) == 2
+ assert email.changelog_entries[0].folder == 'gcc/cp'
+ assert email.changelog_entries[0].prs == ['PR c++/90916']
+ assert email.changelog_entries[0].files == ['pt.c']
+ # this one is added automatically
+ assert email.changelog_entries[1].folder == 'gcc/testsuite'
+
+ def test_only_changelog_updated(self):
+ email = self.from_patch_glob('0129')
+ assert not email.errors
+ assert not email.changelog_entries
+
+ def test_wrong_mentioned_filename(self):
+ email = self.from_patch_glob('0096')
+ assert email.errors
+ err = email.errors[0]
+ assert err.message == 'unchanged file mentioned in a ChangeLog'
+ assert err.line == 'gcc/testsuite/gcc.target/aarch64/' \
+ 'advsimd-intrinsics/vdot-compile-3-1.c'
+
+ def test_missing_tab(self):
+ email = self.from_patch_glob('0031')
+ assert len(email.errors) == 2
+ err = email.errors[0]
+ assert err.message == 'line should start with a tab'
+ assert err.line == ' * cfgloopanal.c (average_num_loop_insns): ' \
+ 'Free bbs when early'
+
+ def test_leading_changelog_format(self):
+ email = self.from_patch_glob('0184')
+ assert len(email.errors) == 4
+ assert email.errors[0].line == 'gcc/c-family/c-cppbuiltins.c'
+ assert email.errors[2].line == 'gcc/c-family/c-cppbuiltin.c'
+
+ def test_cannot_deduce_no_blank_line(self):
+ email = self.from_patch_glob('0334')
+ assert len(email.errors) == 1
+ assert len(email.changelog_entries) == 1
+ assert email.changelog_entries[0].folder is None
+
+ def test_author_lines(self):
+ email = self.from_patch_glob('0814')
+ assert not email.errors
+ assert (email.changelog_entries[0].author_lines ==
+ [('Martin Jambor <mjambor@suse.cz>', '2020-02-19')])
+
+ def test_multiple_authors_and_prs(self):
+ email = self.from_patch_glob('0735')
+ assert len(email.changelog_entries) == 1
+ entry = email.changelog_entries[0]
+ assert len(entry.author_lines) == 2
+ assert len(entry.authors) == 2
+ assert (entry.author_lines[1] ==
+ ('Bernd Edlinger <bernd.edlinger@hotmail.de>', None))
+
+ def test_multiple_prs(self):
+ email = self.from_patch_glob('1699')
+ assert len(email.changelog_entries) == 2
+ assert len(email.changelog_entries[0].prs) == 2
+
+ def test_missing_PR_component(self):
+ email = self.from_patch_glob('0735')
+ assert len(email.errors) == 1
+ assert email.errors[0].message == 'missing PR component'
+
+ def test_invalid_PR_component(self):
+ email = self.from_patch_glob('0198')
+ assert len(email.errors) == 1
+ assert email.errors[0].message == 'invalid PR component'
+
+ def test_additional_author_list(self):
+ email = self.from_patch_glob('0342')
+ msg = 'additional author must be indented ' \
+ 'with one tab and four spaces'
+ assert email.errors[1].message == msg
+
+ def test_trailing_whitespaces(self):
+ email = self.get_git_email('trailing-whitespaces.patch')
+ assert len(email.errors) == 3
+
+ def test_space_after_asterisk(self):
+ email = self.from_patch_glob('1999')
+ assert len(email.errors) == 1
+ assert email.errors[0].message == 'one space should follow asterisk'
+
+ def test_long_lines(self):
+ email = self.get_git_email('long-lines.patch')
+ assert len(email.errors) == 1
+ assert email.errors[0].message == 'line exceeds 100 character limit'
+
+ def test_new_files(self):
+ email = self.from_patch_glob('0030')
+ assert not email.errors
+
+ def test_wrong_changelog_location(self):
+ email = self.from_patch_glob('0043')
+ assert len(email.errors) == 2
+ assert (email.errors[0].message ==
+ 'wrong ChangeLog location "gcc", should be "gcc/testsuite"')
+
+ def test_single_author_name(self):
+ email = self.from_patch_glob('1975')
+ assert len(email.changelog_entries) == 2
+ assert len(email.changelog_entries[0].author_lines) == 1
+ assert len(email.changelog_entries[1].author_lines) == 1
+
+ def test_bad_first_line(self):
+ email = self.from_patch_glob('0413')
+ assert len(email.errors) == 1
+
+ def test_co_authored_by(self):
+ email = self.from_patch_glob('1850')
+ assert email.co_authors == ['Jakub Jelinek <jakub@redhat.com>']
+ output_entries = list(email.to_changelog_entries())
+ assert len(output_entries) == 2
+ ent0 = output_entries[0]
+ assert ent0[1].startswith('2020-04-16 Martin Liska '
+ '<mliska@suse.cz>\n\t'
+ ' Jakub Jelinek <jakub@redhat.com>')
+
+ def test_multiple_co_author_formats(self):
+ email = self.get_git_email('co-authored-by.patch')
+ assert len(email.co_authors) == 3
+ assert email.co_authors[0] == 'Jakub Jelinek <jakub@redhat.com>'
+ assert email.co_authors[1] == 'John Miller <jm@example.com>'
+ assert email.co_authors[2] == 'John Miller2 <jm2@example.com>'
+
+ def test_new_file_added_entry(self):
+ email = self.from_patch_glob('1957')
+ output_entries = list(email.to_changelog_entries())
+ assert len(output_entries) == 2
+ needle = ('\t* g++.dg/cpp2a/lambda-generic-variadic20.C'
+ ': New file.')
+ assert output_entries[1][1].endswith(needle)
+ assert email.changelog_entries[1].prs == ['PR c++/94546']
+
+ def test_global_pr_entry(self):
+ email = self.from_patch_glob('2004')
+ assert not email.errors
+ assert email.changelog_entries[0].prs == ['PR other/94629']
+
+ def test_unique_prs(self):
+ email = self.get_git_email('pr-check1.patch')
+ assert not email.errors
+ assert email.changelog_entries[0].prs == ['PR ipa/12345']
+ assert email.changelog_entries[1].prs == []
+
+ def test_multiple_prs_not_added(self):
+ email = self.from_patch_glob('0001-Add-patch_are')
+ assert not email.errors
+ assert email.changelog_entries[0].prs == ['PR target/93492']
+ assert email.changelog_entries[1].prs == ['PR target/12345']
+ assert email.changelog_entries[2].prs == []
+ assert email.changelog_entries[2].folder == 'gcc/testsuite'
+
+ def test_strict_mode(self):
+ email = self.from_patch_glob('0001-Add-patch_are',
+ True)
+ msg = 'ChangeLog, DATESTAMP, BASE-VER and DEV-PHASE updates should ' \
+ 'be done separately from normal commits'
+ assert email.errors[0].message == msg
+
+ def test_strict_mode_normal_patch(self):
+ email = self.get_git_email('0001-Just-test-it.patch', True)
+ assert not email.errors
+
+ def test_strict_mode_datestamp_only(self):
+ email = self.get_git_email('0002-Bump-date.patch', True)
+ assert not email.errors
+
+ def test_wrong_changelog_entry(self):
+ email = self.from_patch_glob('0020-IPA-Avoid')
+ msg = 'first line should start with a tab, an asterisk and a space'
+ assert (email.errors[0].message == msg)
+
+ def test_cherry_pick_format(self):
+ email = self.from_patch_glob('0001-c-Alias.patch')
+ assert not email.errors
+
+ def test_signatures(self):
+ email = self.from_patch_glob('0001-RISC-V-Make-unique.patch')
+ assert not email.errors
+ assert len(email.changelog_entries) == 1
+
+ def test_duplicate_top_level_author(self):
+ email = self.from_patch_glob('0001-Fortran-ProcPtr-function.patch')
+ assert not email.errors
+ assert len(email.changelog_entries[0].author_lines) == 1
+
+ def test_dr_entry(self):
+ email = self.from_patch_glob('0001-c-C-20-DR-2237.patch')
+ assert email.changelog_entries[0].prs == ['DR 2237']
+
+ def test_changes_only_in_ignored_location(self):
+ email = self.from_patch_glob('0001-go-in-ignored-location.patch')
+ assert not email.errors
+
+ def test_changelog_for_ignored_location(self):
+ email = self.from_patch_glob('0001-Update-merge.sh-to-reflect.patch')
+ assert (email.changelog_entries[0].lines[0]
+ == '\t* LOCAL_PATCHES: Use git hash instead of SVN id.')
+
+ def test_multiline_file_list(self):
+ email = self.from_patch_glob(
+ '0001-Ada-Reuse-Is_Package_Or_Generic_Package-where-possib.patch')
+ assert (email.changelog_entries[0].files
+ == ['contracts.adb', 'einfo.adb', 'exp_ch9.adb',
+ 'sem_ch12.adb', 'sem_ch4.adb', 'sem_ch7.adb',
+ 'sem_ch8.adb', 'sem_elab.adb', 'sem_type.adb',
+ 'sem_util.adb'])
+
+ @unittest.skipIf(not unidiff_supports_renaming,
+ 'Newer version of unidiff is needed (0.6.0+)')
+ def test_renamed_file(self):
+ email = self.from_patch_glob(
+ '0001-Ada-Add-support-for-XDR-streaming-in-the-default-run.patch')
+ assert not email.errors
+
+ def test_duplicite_author_lines(self):
+ email = self.from_patch_glob('0001-Fortran-type-is-real-kind-1.patch')
+ assert (email.changelog_entries[0].author_lines[0][0]
+ == 'Steven G. Kargl <kargl@gcc.gnu.org>')
+ assert (email.changelog_entries[0].author_lines[1][0]
+ == 'Mark Eggleston <markeggleston@gcc.gnu.org>')
+
+ def test_missing_change_description(self):
+ email = self.from_patch_glob('0001-Missing-change-description.patch')
+ assert len(email.errors) == 2
+ assert email.errors[0].message == 'missing description of a change'
+ assert email.errors[1].message == 'missing description of a change'
+
+ def test_libstdcxx_html_regenerated(self):
+ email = self.from_patch_glob('0001-Fix-text-of-hyperlink')
+ assert not email.errors
+ email = self.from_patch_glob('0002-libstdc-Fake-test-change-1.patch')
+ assert len(email.errors) == 1
+ msg = 'pattern doesn''t match any changed files'
+ assert email.errors[0].message == msg
+ assert email.errors[0].line == 'libstdc++-v3/doc/html/'
+ email = self.from_patch_glob('0003-libstdc-Fake-test-change-2.patch')
+ assert len(email.errors) == 1
+ msg = 'changed file not mentioned in a ChangeLog'
+ assert email.errors[0].message == msg
+
+ def test_not_deduce(self):
+ email = self.from_patch_glob('0001-configure.patch')
+ assert not email.errors
+ assert len(email.changelog_entries) == 2
+
+ def test_parse_git_name_status(self):
+ modified_files = GitCommit.parse_git_name_status(NAME_STATUS1)
+ assert len(modified_files) == 3
+ assert modified_files[1] == ('gcc/ada/libgnat/s-atopar.adb', 'D')
+ assert modified_files[2] == ('gcc/ada/libgnat/s-aoinar.adb', 'A')
+
+ def test_backport(self):
+ email = self.from_patch_glob('0001-asan-fix-RTX-emission.patch')
+ assert not email.errors
+ assert len(email.changelog_entries) == 1
+ entry = list(email.to_changelog_entries())[0][1]
+ assert entry.startswith('2020-06-11 Martin Liska <mliska@suse.cz>')
+ assert '\tBackported from master:' in entry
+ assert '\t2020-06-11 Martin Liska <mliska@suse.cz>' in entry
+ assert '\t\t Jakub Jelinek <jakub@redhat.com>' in entry
+
+ def test_square_and_lt_gt(self):
+ email = self.from_patch_glob('0001-Check-for-more-missing')
+ assert not email.errors
diff --git a/contrib/gcc-changelog/test_patches.txt b/contrib/gcc-changelog/test_patches.txt
new file mode 100644
index 0000000..2bf5d1a
--- /dev/null
+++ b/contrib/gcc-changelog/test_patches.txt
@@ -0,0 +1,3197 @@
+=== 0342-ARC-Propagate-uncached-type-attribute-to-each-member.patch ===
+From 62a715c706d8482560dadfa9ead0766f3c20e434 Mon Sep 17 00:00:00 2001
+From: Claudiu Zissulescu <claziss@gmail.com>
+Date: Mon, 27 Jan 2020 14:51:03 +0200
+Subject: [PATCH 0342/2034] [ARC] Propagate uncached type attribute to each
+ member of a struct.
+
+Like `packed` type attribute, the ARC's `uncached` type attribute
+needs to be propagated to each member of the struct where it is used,
+triggering the .di flag for any access of the struct members. However,
+any complex CFG manipulation may drop memory pointer type attributes,
+leading to the impossibility to discriminate the direct accesses from
+normal ones. To solve this issue, we will treat the direct memory
+accessed specially via unspecs.
+
+gcc/
+xxxx-xx-xx Claudiu Zissulescu <claziss@synopsys.com>
+ Petro Karashchenko <petro.karashchenko@ring.com>
+
+ * config/arc/arc.c (arc_is_uncached_mem_p): Check struct
+ attributes if needed.
+ (prepare_move_operands): Generate special
+ unspec instruction for direct access.
+ (arc_isuncached_mem_p): Propagate uncached attribute to each
+ structure member.
+ * config/arc/arc.md (VUNSPEC_ARC_LDDI): Define.
+ (VUNSPEC_ARC_STDI): Likewise.
+ (ALLI): New mode iterator.
+ (mALLI): New mode attribute.
+ (lddi): New instruction pattern.
+ (stdi): Likewise.
+ (stdidi_split): Split instruction for architectures which are not
+ supporting ll64 option.
+ (lddidi_split): Likewise.
+
+testsuite/
+xxxx-xx-xx Claudiu Zissulescu <claziss@synopsys.com>
+ Petro Karashchenko <petro.karashchenko@ring.com>
+
+ * gcc.target/arc/uncached-1.c: Update test.
+ * gcc.target/arc/uncached-2.c: Likewise.
+ * gcc.target/arc/uncached-3.c: New test.
+ * gcc.target/arc/uncached-4.c: Likewise.
+ * gcc.target/arc/uncached-5.c: Likewise.
+ * gcc.target/arc/uncached-6.c: Likewise.
+ * gcc.target/arc/uncached-7.c: Likewise.
+ * gcc.target/arc/uncached-8.c: Likewise.
+ * gcc.target/arc/arc.exp (ll64): New predicate.
+---
+ gcc/ChangeLog | 19 ++++
+ gcc/config/arc/arc.c | 118 ++++++++++++++--------
+ gcc/config/arc/arc.md | 60 +++++++++++
+ gcc/testsuite/ChangeLog | 11 ++
+ gcc/testsuite/gcc.target/arc/arc.exp | 9 ++
+ gcc/testsuite/gcc.target/arc/uncached-1.c | 2 +-
+ gcc/testsuite/gcc.target/arc/uncached-2.c | 2 +-
+ gcc/testsuite/gcc.target/arc/uncached-3.c | 22 ++++
+ gcc/testsuite/gcc.target/arc/uncached-4.c | 42 ++++++++
+ gcc/testsuite/gcc.target/arc/uncached-5.c | 29 ++++++
+ gcc/testsuite/gcc.target/arc/uncached-6.c | 35 +++++++
+ gcc/testsuite/gcc.target/arc/uncached-7.c | 11 ++
+ gcc/testsuite/gcc.target/arc/uncached-8.c | 33 ++++++
+ 13 files changed, 351 insertions(+), 42 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/arc/uncached-3.c
+ create mode 100644 gcc/testsuite/gcc.target/arc/uncached-4.c
+ create mode 100644 gcc/testsuite/gcc.target/arc/uncached-5.c
+ create mode 100644 gcc/testsuite/gcc.target/arc/uncached-6.c
+ create mode 100644 gcc/testsuite/gcc.target/arc/uncached-7.c
+ create mode 100644 gcc/testsuite/gcc.target/arc/uncached-8.c
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 91dfcd71a4b..2cc61d68cf3 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
+index 22475f2732e..e1a865f02e6 100644
+--- a/gcc/config/arc/arc.c
++++ b/gcc/config/arc/arc.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
+index cf7aa8d83c9..46cb254ed28 100644
+--- a/gcc/config/arc/arc.md
++++ b/gcc/config/arc/arc.md
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 16ddef07516..991934272e0 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/arc/arc.exp b/gcc/testsuite/gcc.target/arc/arc.exp
+index 8d1844edd22..501d4589c53 100644
+--- a/gcc/testsuite/gcc.target/arc/arc.exp
++++ b/gcc/testsuite/gcc.target/arc/arc.exp
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/arc/uncached-1.c b/gcc/testsuite/gcc.target/arc/uncached-1.c
+index 7a6bade81c4..fa5ecb7b7d3 100644
+--- a/gcc/testsuite/gcc.target/arc/uncached-1.c
++++ b/gcc/testsuite/gcc.target/arc/uncached-1.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/arc/uncached-2.c b/gcc/testsuite/gcc.target/arc/uncached-2.c
+index 89eed326e01..9d6bfbbb50e 100644
+--- a/gcc/testsuite/gcc.target/arc/uncached-2.c
++++ b/gcc/testsuite/gcc.target/arc/uncached-2.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/arc/uncached-3.c b/gcc/testsuite/gcc.target/arc/uncached-3.c
+new file mode 100644
+index 00000000000..f2a317b2816
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/arc/uncached-3.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/gcc.target/arc/uncached-4.c b/gcc/testsuite/gcc.target/arc/uncached-4.c
+new file mode 100644
+index 00000000000..fecb16648b8
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/arc/uncached-4.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/gcc.target/arc/uncached-5.c b/gcc/testsuite/gcc.target/arc/uncached-5.c
+new file mode 100644
+index 00000000000..4fe0464fdde
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/arc/uncached-5.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/gcc.target/arc/uncached-6.c b/gcc/testsuite/gcc.target/arc/uncached-6.c
+new file mode 100644
+index 00000000000..581a9eccb3b
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/arc/uncached-6.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/gcc.target/arc/uncached-7.c b/gcc/testsuite/gcc.target/arc/uncached-7.c
+new file mode 100644
+index 00000000000..4001b8bd821
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/arc/uncached-7.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/gcc.target/arc/uncached-8.c b/gcc/testsuite/gcc.target/arc/uncached-8.c
+new file mode 100644
+index 00000000000..060229b11df
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/arc/uncached-8.c
+@@ -0,0 +1 @@
++
+--
+2.26.1
+
+=== 0814-sra-Avoid-totally-scalarizing-overallping-field_decl.patch ===
+From 665c5bad168ab63629b29ed2ce08ed042c088dc2 Mon Sep 17 00:00:00 2001
+From: Martin Jambor <mjambor@suse.cz>
+Date: Wed, 19 Feb 2020 11:08:40 +0100
+Subject: [PATCH 0814/2034] sra: Avoid totally scalarizing overallping
+ field_decls (PR 93667)
+
+[[no_unique_address]] C++ attribute can cause two fields of a
+RECORD_TYPE overlap, which currently confuses the totally scalarizing
+code into creating invalid access tree. For GCC 10, I'd like to
+simply disable total scalarization of types where this happens.
+
+For GCC 11 I'll write down a TODO item to enable total scalarization
+of cases like this where the problematic fields are basically empty -
+despite having a non-zero size - i.e. when they are just RECORD_TYPEs
+without any data fields.
+
+2020-02-19 Martin Jambor <mjambor@suse.cz>
+
+ gcc/
+
+ PR tree-optimization/93667
+ * tree-sra.c (scalarizable_type_p): Return false if record fields
+ do not follow wach other.
+
+ gcc/testsuite/
+
+ PR tree-optimization/93667
+ * g++.dg/tree-ssa/pr93667.C: New test.
+---
+ gcc/ChangeLog | 6 ++++++
+ gcc/testsuite/ChangeLog | 5 +++++
+ gcc/testsuite/g++.dg/tree-ssa/pr93667.C | 11 +++++++++++
+ gcc/tree-sra.c | 14 ++++++++++++++
+ 4 files changed, 36 insertions(+)
+ create mode 100644 gcc/testsuite/g++.dg/tree-ssa/pr93667.C
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 77c2a9ad810..6b53f9a2f07 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 9b4fe11a6f6..8033fa0a3bb 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr93667.C b/gcc/testsuite/g++.dg/tree-ssa/pr93667.C
+new file mode 100644
+index 00000000000..d875f53d9ec
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/tree-ssa/pr93667.C
+@@ -0,0 +1 @@
++
+diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
+index 0cfac0a8192..4c7d651e6b9 100644
+--- a/gcc/tree-sra.c
++++ b/gcc/tree-sra.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 0413-SRA-Total-scalarization-after-access-propagation-PR9.patch ===
+From 636e80eea24b780f1d5f4c14c58fc00001df8508 Mon Sep 17 00:00:00 2001
+From: Martin Jambor <mjambor@suse.cz>
+Date: Wed, 29 Jan 2020 13:13:13 +0100
+Subject: [PATCH 0413/2034] SRA: Total scalarization after access propagation
+ [PR92706]
+
+2020-01-29 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/92706
+ * tree-sra.c (struct access): Adjust comment of
+ grp_total_scalarization.
+ (find_access_in_subtree): Look for single children spanning an entire
+ access.
+ (scalarizable_type_p): Allow register accesses, adjust callers.
+ (completely_scalarize): Remove function.
+ (scalarize_elem): Likewise.
+ (create_total_scalarization_access): Likewise.
+ (sort_and_splice_var_accesses): Do not track total scalarization
+ flags.
+ (analyze_access_subtree): New parameter totally, adjust to new meaning
+ of grp_total_scalarization.
+ (analyze_access_trees): Pass new parameter to analyze_access_subtree.
+ (can_totally_scalarize_forest_p): New function.
+ (create_total_scalarization_access): Likewise.
+ (create_total_access_and_reshape): Likewise.
+ (total_should_skip_creating_access): Likewise.
+ (totally_scalarize_subtree): Likewise.
+ (analyze_all_variable_accesses): Perform total scalarization after
+ subaccess propagation using the new functions above.
+ (initialize_constant_pool_replacements): Output initializers by
+ traversing the access tree.
+
+ testsuite/
+ * gcc.dg/tree-ssa/pr92706-2.c: New test.
+ * gcc.dg/guality/pr59776.c: Xfail tests for s2.g.
+---
+ gcc/ChangeLog | 26 +
+ gcc/testsuite/ChangeLog | 6 +
+ gcc/testsuite/gcc.dg/guality/pr59776.c | 4 +-
+ gcc/testsuite/gcc.dg/tree-ssa/pr92706-2.c | 19 +
+ gcc/tree-sra.c | 666 ++++++++++++++++------
+ 5 files changed, 537 insertions(+), 184 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr92706-2.c
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 16247a59304..61da54df346 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 05518848829..38758207989 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.dg/guality/pr59776.c b/gcc/testsuite/gcc.dg/guality/pr59776.c
+index 382abb622bb..6c1c8165b70 100644
+--- a/gcc/testsuite/gcc.dg/guality/pr59776.c
++++ b/gcc/testsuite/gcc.dg/guality/pr59776.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr92706-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92706-2.c
+new file mode 100644
+index 00000000000..37ab9765db0
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92706-2.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
+index 36106fecaf1..2b0849858de 100644
+--- a/gcc/tree-sra.c
++++ b/gcc/tree-sra.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 0334-Do-not-generate-a-unique-fnname-for-resolver.patch ===
+From c2bd2b4664be8b73f8fd58a64dec1e93871797cc Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Mon, 27 Jan 2020 10:48:18 +0100
+Subject: [PATCH 0334/2034] Do not generate a unique fnname for resolver.
+
+ PR target/93274
+ * config/i386/i386-features.c (make_resolver_func):
+ Align the code with ppc64 target implementation.
+ Do not generate a unique name for resolver function.
+ PR target/93274
+ * gcc.target/i386/pr81213.c: Adjust to not expect
+ a globally unique name.
+---
+ gcc/ChangeLog | 7 +++++++
+ gcc/config/i386/i386-features.c | 19 ++++---------------
+ gcc/testsuite/ChangeLog | 6 ++++++
+ gcc/testsuite/gcc.target/i386/pr81213.c | 4 ++--
+ 4 files changed, 19 insertions(+), 17 deletions(-)
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 45075840824..59806baa757 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/i386/i386-features.c b/gcc/config/i386/i386-features.c
+index e580b26b995..b49e6f8d408 100644
+--- a/gcc/config/i386/i386-features.c
++++ b/gcc/config/i386/i386-features.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 2de060843d9..22a37dd1ab2 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/i386/pr81213.c b/gcc/testsuite/gcc.target/i386/pr81213.c
+index 13e15d5fef0..89c47529861 100644
+--- a/gcc/testsuite/gcc.target/i386/pr81213.c
++++ b/gcc/testsuite/gcc.target/i386/pr81213.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 1850-List-valid-pairs-for-new-and-delete-operators.patch ===
+From d7a65edb629a010f7ef907d457343abcb569fab7 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Thu, 16 Apr 2020 15:39:22 +0200
+Subject: [PATCH 1850/2034] List valid pairs for new and delete operators.
+
+ PR c++/94314
+ * cgraphclones.c (set_new_clone_decl_and_node_flags): Drop
+ DECL_IS_REPLACEABLE_OPERATOR during cloning.
+ * tree-ssa-dce.c (valid_new_delete_pair_p): New function.
+ (propagate_necessity): Check operator names.
+
+ PR c++/94314
+ * g++.dg/pr94314.C: Do not use dg-additional-options
+ and remove not needed stdio.h include.
+ * g++.dg/pr94314-2.C: Likewise.
+ * g++.dg/pr94314-3.C: Likewise.
+ * g++.dg/pr94314-4.C: New test.
+
+Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
+---
+ gcc/ChangeLog | 9 +++
+ gcc/cgraphclones.c | 2 +
+ gcc/testsuite/ChangeLog | 10 ++++
+ gcc/testsuite/g++.dg/pr94314-2.C | 5 +-
+ gcc/testsuite/g++.dg/pr94314-3.C | 5 +-
+ gcc/testsuite/g++.dg/pr94314-4.C | 30 ++++++++++
+ gcc/testsuite/g++.dg/pr94314.C | 5 +-
+ gcc/tree-ssa-dce.c | 98 ++++++++++++++++++++++++++++----
+ 8 files changed, 142 insertions(+), 22 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/pr94314-4.C
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 74dbeeb44c6..9e499ec9c86 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
+index c73b8f810f0..8f541a28b6e 100644
+--- a/gcc/cgraphclones.c
++++ b/gcc/cgraphclones.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 756f1d759e6..94d2312022d 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/pr94314-2.C b/gcc/testsuite/g++.dg/pr94314-2.C
+index 36b93ed6d4d..998ce601767 100644
+--- a/gcc/testsuite/g++.dg/pr94314-2.C
++++ b/gcc/testsuite/g++.dg/pr94314-2.C
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/pr94314-3.C b/gcc/testsuite/g++.dg/pr94314-3.C
+index 575ba9d8ad8..846a5d6a3d8 100644
+--- a/gcc/testsuite/g++.dg/pr94314-3.C
++++ b/gcc/testsuite/g++.dg/pr94314-3.C
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/pr94314-4.C b/gcc/testsuite/g++.dg/pr94314-4.C
+new file mode 100644
+index 00000000000..d097f29d4ad
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/pr94314-4.C
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/g++.dg/pr94314.C b/gcc/testsuite/g++.dg/pr94314.C
+index 86e651d10ba..4e5ae122e9f 100644
+--- a/gcc/testsuite/g++.dg/pr94314.C
++++ b/gcc/testsuite/g++.dg/pr94314.C
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
+index fd5f24c746c..757cfad5b5e 100644
+--- a/gcc/tree-ssa-dce.c
++++ b/gcc/tree-ssa-dce.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 0085-Daily-bump.patch ===
+From 03647d2e26176bb874460b67deab0c30aa715d59 Mon Sep 17 00:00:00 2001
+From: GCC Administrator <gccadmin@gcc.gnu.org>
+Date: Thu, 16 Jan 2020 00:16:32 +0000
+Subject: [PATCH 0085/2034] Daily bump.
+
+---
+ gcc/DATESTAMP | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
+index ba948c594d4..62611957f86 100644
+--- a/gcc/DATESTAMP
++++ b/gcc/DATESTAMP
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 0040-PR90916-ICE-in-retrieve-specialization.patch ===
+From a5a3c2dcf73aa245b0eb6f6cf56c4d03ab6056da Mon Sep 17 00:00:00 2001
+From: Nathan Sidwell <nathans@fb.com>
+Date: Tue, 14 Jan 2020 11:12:40 -0800
+Subject: [PATCH 0040/2034] [PR90916] ICE in retrieve specialization
+
+https://gcc.gnu.org/ml/gcc-patches/2020-01/msg00809.html
+ PR c++/90916
+ * pt.c (retrieve_specialization): Get the TI from the decl or the
+ classtype as appropriate.
+---
+ gcc/cp/ChangeLog | 6 ++++++
+ gcc/cp/pt.c | 15 ++++++++++-----
+ gcc/testsuite/g++.dg/template/pr90916.C | 8 ++++++++
+ 3 files changed, 24 insertions(+), 5 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/template/pr90916.C
+
+diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
+index 004ce0fdcdf..3cc7c48b490 100644
+--- a/gcc/cp/ChangeLog
++++ b/gcc/cp/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
+index fa82ecad233..4fdc74f9ca8 100644
+--- a/gcc/cp/pt.c
++++ b/gcc/cp/pt.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/template/pr90916.C b/gcc/testsuite/g++.dg/template/pr90916.C
+new file mode 100644
+index 00000000000..bdb7e7b58ef
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/template/pr90916.C
+@@ -0,0 +1 @@
++
+--
+2.26.1
+
+=== 2004-amdgcn-Check-HSA-return-codes-PR94629.patch ===
+From 966de09be91c639d66d252c9ae6ab8da5ebfca18 Mon Sep 17 00:00:00 2001
+From: Andrew Stubbs <ams@codesourcery.com>
+Date: Mon, 20 Apr 2020 15:25:31 +0100
+Subject: [PATCH 2004/2034] amdgcn: Check HSA return codes [PR94629]
+
+Ensure that the returned status values are not ignored. The old code was
+not broken, but this is both safer and satisfies static analysis.
+
+2020-04-23 Andrew Stubbs <ams@codesourcery.com>
+
+ PR other/94629
+
+ libgomp/
+ * plugin/plugin-gcn.c (init_hsa_context): Check return value from
+ hsa_iterate_agents.
+ (GOMP_OFFLOAD_init_device): Check return values from both calls to
+ hsa_agent_iterate_regions.
+---
+ libgomp/ChangeLog | 9 +++++++++
+ libgomp/plugin/plugin-gcn.c | 8 ++++++++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
+index c524abbbfb6..ee1764d4ae3 100644
+--- a/libgomp/ChangeLog
++++ b/libgomp/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c
+index dc72c90962c..4c6a4c03b6e 100644
+--- a/libgomp/plugin/plugin-gcn.c
++++ b/libgomp/plugin/plugin-gcn.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 0198-Change-recursive-prepare_block_for_update-to-use-a-w.patch ===
+From 6fc2f9337311c11dabcc464c808cbef205f17a52 Mon Sep 17 00:00:00 2001
+From: Andrew Pinski <apinski@marvell.com>
+Date: Tue, 21 Jan 2020 08:34:42 +0000
+Subject: [PATCH 0198/2034] Change recursive prepare_block_for_update to use a
+ worklist
+
+Reported as PR 93321, prepare_block_for_update with some huge
+recusive inlining can go past the stack limit. Transforming this
+recursive into worklist improves the stack usage here and we no
+longer seg fault for the testcase. Note the order we walk the siblings
+change.
+
+ChangeLog:
+ PR tree-opt/93321
+ * tree-into-ssa.c (prepare_block_for_update_1): Split out from ...
+ (prepare_block_for_update): This. Use a worklist instead of recursing.
+---
+ gcc/ChangeLog | 8 ++++++
+ gcc/tree-into-ssa.c | 59 ++++++++++++++++++++++++++++++++++++---------
+ 2 files changed, 55 insertions(+), 12 deletions(-)
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 8c17e5992d2..262f0d6506f 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
+index c27bf2ce121..6528acac31a 100644
+--- a/gcc/tree-into-ssa.c
++++ b/gcc/tree-into-ssa.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 0184-PR-80005-Fix-__has_include.patch ===
+From ad1a3914ae8d67c94b0d2428e3f9672e7db491a1 Mon Sep 17 00:00:00 2001
+From: Nathan Sidwell <nathan@acm.org>
+Date: Mon, 20 Jan 2020 05:39:59 -0800
+Subject: [PATCH 0184/2034] [PR 80005] Fix __has_include
+
+__has_include is funky in that it is macro-like from the POV of #ifdef and
+friends, but lexes its parenthesize argument #include-like. We were
+failing the second part of that, because we used a forwarding macro to an
+internal name, and hence always lexed the argument in macro-parameter
+context. We componded that by not setting the right flag when lexing, so
+it didn't even know. Mostly users got lucky.
+
+This reimplements the handline.
+1) Remove the forwarding, but declare object-like macros that
+expand to themselves. This satisfies the #ifdef requirement
+
+2) Correctly set angled_brackets when lexing the parameter. This tells
+the lexer (a) <...> is a header name and (b) "..." is too (not a string).
+
+3) Remove the in__has_include lexer state, just tell find_file that that's
+what's happenning, so it doesn't emit an error.
+
+We lose the (undocumented) ability to #undef __has_include. That may well
+have been an accident of implementation. There are no tests for it.
+
+We gain __has_include behaviour for all users of the preprocessors -- not
+just the C-family ones that defined a forwarding macro.
+
+ libcpp/
+ PR preprocessor/80005
+ * include/cpplib.h (BT_HAS_ATTRIBUTE): Fix comment.
+ * internal.h (struct lexer_state): Delete in__has_include field.
+ (struct spec_nodes): Rename n__has_include{,_next}__ fields.
+ (_cpp_defined_macro_p): New.
+ (_cpp_find_file): Add has_include parm.
+ * directives.c (lex_macro_node): Combine defined,
+ __has_inline{,_next} checking.
+ (do_ifdef, do_ifndef): Use _cpp_defined_macro_p.
+ (_cpp_init_directives): Refactor.
+ * expr.c (parse_defined): Use _cpp_defined_macro_p.
+ (eval_token): Adjust parse_has_include calls.
+ (parse_has_include): Add OP parameter. Reimplement.
+ * files.c (_cpp_find_file): Add HAS_INCLUDE parm. Use it to
+ inhibit error message.
+ (_cpp_stack_include): Adjust _cpp_find_file call.
+ (_cpp_fake_include, _cpp_compare_file_date): Likewise.
+ (open_file_failed): Remove in__has_include check.
+ (_cpp_has_header): Adjust _cpp_find_file call.
+ * identifiers.c (_cpp_init_hashtable): Don't init
+ __has_include{,_next} here ...
+ * init.c (cpp_init_builtins): ... init them here. Define as
+ macros.
+ (cpp_read_main_file): Adjust _cpp_find_file call.
+ * pch.c (cpp_read_state): Adjust __has_include{,_next} access.
+ * traditional.c (_cpp_scan_out_locgical_line): Likewise.
+
+ gcc/c-family/
+ PR preprocessor/80005
+ * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
+
+ gcc/testsuite/
+ PR preprocessor/80005
+ * g++.dg/cpp1y/feat-cxx14.C: Adjust.
+ * g++.dg/cpp1z/feat-cxx17.C: Adjust.
+ * g++.dg/cpp2a/feat-cxx2a.C: Adjust.
+ * g++.dg/cpp/pr80005.C: New.
+---
+ gcc/c-family/ChangeLog | 5 ++++
+ gcc/c-family/c-cppbuiltin.c | 6 -----
+ gcc/testsuite/ChangeLog | 8 +++++++
+ gcc/testsuite/g++.dg/cpp/pr80005.C | 24 +++++++++++++++++++
+ gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C | 10 ++------
+ gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C | 10 ++------
+ gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C | 10 ++------
+ libcpp/ChangeLog | 29 +++++++++++++++++++++-
+ libcpp/directives.c | 29 ++++++++--------------
+ libcpp/expr.c | 32 ++++++++++++-------------
+ libcpp/files.c | 27 +++++++++++----------
+ libcpp/identifiers.c | 3 +--
+ libcpp/include/cpplib.h | 2 +-
+ libcpp/init.c | 14 ++++++++++-
+ libcpp/internal.h | 20 +++++++++++-----
+ libcpp/pch.c | 4 ++--
+ libcpp/traditional.c | 8 +++----
+ 17 files changed, 146 insertions(+), 95 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/cpp/pr80005.C
+
+diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
+index 09ba2c8b40f..fdddb98a74d 100644
+--- a/gcc/c-family/ChangeLog
++++ b/gcc/c-family/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
+index a6308921dc9..70a12055e27 100644
+--- a/gcc/c-family/c-cppbuiltin.c
++++ b/gcc/c-family/c-cppbuiltin.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index a526e32ac89..67d5f2e9e28 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/cpp/pr80005.C b/gcc/testsuite/g++.dg/cpp/pr80005.C
+new file mode 100644
+index 00000000000..cc752616782
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp/pr80005.C
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
+index a2a93f437b3..a78b6a36f36 100644
+--- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
++++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
+index 55e56a06fe8..e6f456b2415 100644
+--- a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
++++ b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
+index dd15cd6af3c..82fd602f9f1 100644
+--- a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
++++ b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
+@@ -1 +1,2 @@
+
++
+diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
+index 3249b93fe88..27a841bbdce 100644
+--- a/libcpp/ChangeLog
++++ b/libcpp/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/libcpp/directives.c b/libcpp/directives.c
+index 983206a5838..10735c8c668 100644
+--- a/libcpp/directives.c
++++ b/libcpp/directives.c
+@@ -1 +1,2 @@
+
++
+diff --git a/libcpp/expr.c b/libcpp/expr.c
+index 317faf50208..df21a4b9fb9 100644
+--- a/libcpp/expr.c
++++ b/libcpp/expr.c
+@@ -1 +1,2 @@
+
++
+diff --git a/libcpp/files.c b/libcpp/files.c
+index 7abae7ae6ec..260e787c329 100644
+--- a/libcpp/files.c
++++ b/libcpp/files.c
+@@ -1 +1,2 @@
+
++
+diff --git a/libcpp/identifiers.c b/libcpp/identifiers.c
+index 562d8fee3b5..9627e1bf4b0 100644
+--- a/libcpp/identifiers.c
++++ b/libcpp/identifiers.c
+@@ -1 +1,2 @@
+
++
+diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
+index 1c26c365347..56cbbd82750 100644
+--- a/libcpp/include/cpplib.h
++++ b/libcpp/include/cpplib.h
+@@ -1 +1,2 @@
+
++
+diff --git a/libcpp/init.c b/libcpp/init.c
+index 2b4923e1451..e798140ef8b 100644
+--- a/libcpp/init.c
++++ b/libcpp/init.c
+@@ -1 +1,2 @@
+
++
+diff --git a/libcpp/internal.h b/libcpp/internal.h
+index 3623baf8191..5453c3bff85 100644
+--- a/libcpp/internal.h
++++ b/libcpp/internal.h
+@@ -1 +1,2 @@
+
++
+diff --git a/libcpp/pch.c b/libcpp/pch.c
+index 607f805bebe..e631050936b 100644
+--- a/libcpp/pch.c
++++ b/libcpp/pch.c
+@@ -1 +1,2 @@
+
++
+diff --git a/libcpp/traditional.c b/libcpp/traditional.c
+index 21c63b47dd5..ff06d31a897 100644
+--- a/libcpp/traditional.c
++++ b/libcpp/traditional.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== long-lines.patch ===
+From eb7c7c524556df5364f03adc20f6a9db20858484 Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Mon, 13 Jan 2020 14:14:57 +0100
+Subject: [PATCH 0004/2034] tree-opt: Fix bootstrap failure in
+ tree-ssa-forwprop.c some more PR90838
+
+2020-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/90838
+ * tree-ssa-forwprop.c (simplify_count_trailing_zeroes): Use
+ SCALAR_INT_TYPE_MODE directly in CTZ_DEFINED_VALUE_AT_ZERO macro and and SCALAR_INT_TYPE_MODE directly in and so
+ argument rather than to initialize temporary for targets that
+ don't use the mode argument at all. Initialize ctzval to avoid
+ warning at -O0.
+---
+ gcc/ChangeLog | 9 +++++++++
+ gcc/tree-ssa-forwprop.c | 6 +++---
+ 2 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index a195863212e..f7df07343d1 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
+index aac31d02b6c..56c470f6ecf 100644
+--- a/gcc/tree-ssa-forwprop.c
++++ b/gcc/tree-ssa-forwprop.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 0735-PR-87488-Add-with-diagnostics-urls-configuration-opt.patch ===
+From 458c8d6459c4005fc9886b6e25d168a6535ac415 Mon Sep 17 00:00:00 2001
+From: Bernd Edlinger <bernd.edlinger@hotmail.de>
+Date: Wed, 29 Jan 2020 15:31:10 +0100
+Subject: [PATCH 0735/2034] PR 87488: Add --with-diagnostics-urls configuration
+ option
+
+2020-02-15 David Malcolm <dmalcolm@redhat.com>
+ Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR 87488
+ PR other/93168
+ * config.in (DIAGNOSTICS_URLS_DEFAULT): New define.
+ * configure.ac (--with-diagnostics-urls): New configuration
+ option, based on --with-diagnostics-color.
+ (DIAGNOSTICS_URLS_DEFAULT): New define.
+ * config.h: Regenerate.
+ * configure: Regenerate.
+ * diagnostic.c (diagnostic_urls_init): Handle -1 for
+ DIAGNOSTICS_URLS_DEFAULT from configure-time
+ --with-diagnostics-urls=auto-if-env by querying for a GCC_URLS
+ and TERM_URLS environment variable.
+ * diagnostic-url.h (diagnostic_url_format): New enum type.
+ (diagnostic_urls_enabled_p): rename to...
+ (determine_url_format): ... this, and change return type.
+ * diagnostic-color.c (parse_env_vars_for_urls): New helper function.
+ (auto_enable_urls): Disable URLs on xfce4-terminal, gnome-terminal,
+ the linux console, and mingw.
+ (diagnostic_urls_enabled_p): rename to...
+ (determine_url_format): ... this, and adjust.
+ * pretty-print.h (pretty_printer::show_urls): rename to...
+ (pretty_printer::url_format): ... this, and change to enum.
+ * pretty-print.c (pretty_printer::pretty_printer,
+ pp_begin_url, pp_end_url, test_urls): Adjust.
+ * doc/install.texi (--with-diagnostics-urls): Document the new
+ configuration option.
+ (--with-diagnostics-color): Document the existing interaction
+ with GCC_COLORS better.
+ * doc/invoke.texi (-fdiagnostics-urls): Add GCC_URLS and TERM_URLS
+ vindex reference. Update description of defaults based on the above.
+ (-fdiagnostics-color): Update description of how -fdiagnostics-color
+ interacts with GCC_COLORS.
+---
+ gcc/ChangeLog | 36 +++++++++++++++
+ gcc/config.in | 6 +++
+ gcc/configure | 41 ++++++++++++++++-
+ gcc/configure.ac | 28 ++++++++++++
+ gcc/diagnostic-color.c | 101 ++++++++++++++++++++++++++++++++++++++---
+ gcc/diagnostic-url.h | 18 +++++++-
+ gcc/diagnostic.c | 21 +++++++--
+ gcc/doc/install.texi | 15 ++++--
+ gcc/doc/invoke.texi | 39 ++++++++++++++--
+ gcc/pretty-print.c | 44 +++++++++++++++---
+ gcc/pretty-print.h | 5 +-
+ 11 files changed, 328 insertions(+), 26 deletions(-)
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index e6eb6ab4c21..22f990a3088 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config.in b/gcc/config.in
+index 48292861842..01fb18dbbb5 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/configure b/gcc/configure
+index 5fa565a40a4..f55cdb8c77f 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 671b9a67d81..0e6e475950d 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/diagnostic-color.c b/gcc/diagnostic-color.c
+index d5547952921..b1baded2c9e 100644
+--- a/gcc/diagnostic-color.c
++++ b/gcc/diagnostic-color.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/diagnostic-url.h b/gcc/diagnostic-url.h
+index 6be056941f1..d28460b928b 100644
+--- a/gcc/diagnostic-url.h
++++ b/gcc/diagnostic-url.h
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
+index 3386f070256..e4a08f76def 100644
+--- a/gcc/diagnostic.c
++++ b/gcc/diagnostic.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
+index 6ffafacff50..8ddebbb6267 100644
+--- a/gcc/doc/install.texi
++++ b/gcc/doc/install.texi
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index bd9ecebf103..597151670be 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c
+index 817c1059e08..dde138b0533 100644
+--- a/gcc/pretty-print.c
++++ b/gcc/pretty-print.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/pretty-print.h b/gcc/pretty-print.h
+index 001468c966e..22892f12ab7 100644
+--- a/gcc/pretty-print.h
++++ b/gcc/pretty-print.h
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 0031-Fix-typo-and-avoid-possible-memory-leak-in-average_n.patch ===
+From b38e86ddb7a9b6d7e87d7cc0b23983d027fcbd96 Mon Sep 17 00:00:00 2001
+From: Kewen Lin <linkw@linux.ibm.com>
+Date: Tue, 14 Jan 2020 02:34:10 -0600
+Subject: [PATCH 0031/2034] Fix typo and avoid possible memory leak in
+ average_num_loop_insns
+
+Function average_num_loop_insns forgets to free loop body in early
+return. Besides, overflow comparison checks 1000000 (e6) but the
+return value is 100000 (e5), fix this typo.
+
+gcc/ChangeLog
+
+2020-01-14 Kewen Lin <linkw@gcc.gnu.org>
+
+ * cfgloopanal.c (average_num_loop_insns): Free bbs when early
+ return, fix typo on return value.
+---
+ gcc/ChangeLog | 5 +++++
+ gcc/cfgloopanal.c | 5 ++++-
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 07e5bebe909..f3301b16464 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c
+index 392b1c337c4..0b33e8272a7 100644
+--- a/gcc/cfgloopanal.c
++++ b/gcc/cfgloopanal.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 0735-PR-87488-Add-with-diagnostics-urls-configuration-opt.patch ===
+From 458c8d6459c4005fc9886b6e25d168a6535ac415 Mon Sep 17 00:00:00 2001
+From: Bernd Edlinger <bernd.edlinger@hotmail.de>
+Date: Wed, 29 Jan 2020 15:31:10 +0100
+Subject: [PATCH 0735/2034] PR 87488: Add --with-diagnostics-urls configuration
+ option
+
+2020-02-15 David Malcolm <dmalcolm@redhat.com>
+ Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR 87488
+ PR other/93168
+ * config.in (DIAGNOSTICS_URLS_DEFAULT): New define.
+ * configure.ac (--with-diagnostics-urls): New configuration
+ option, based on --with-diagnostics-color.
+ (DIAGNOSTICS_URLS_DEFAULT): New define.
+ * config.h: Regenerate.
+ * configure: Regenerate.
+ * diagnostic.c (diagnostic_urls_init): Handle -1 for
+ DIAGNOSTICS_URLS_DEFAULT from configure-time
+ --with-diagnostics-urls=auto-if-env by querying for a GCC_URLS
+ and TERM_URLS environment variable.
+ * diagnostic-url.h (diagnostic_url_format): New enum type.
+ (diagnostic_urls_enabled_p): rename to...
+ (determine_url_format): ... this, and change return type.
+ * diagnostic-color.c (parse_env_vars_for_urls): New helper function.
+ (auto_enable_urls): Disable URLs on xfce4-terminal, gnome-terminal,
+ the linux console, and mingw.
+ (diagnostic_urls_enabled_p): rename to...
+ (determine_url_format): ... this, and adjust.
+ * pretty-print.h (pretty_printer::show_urls): rename to...
+ (pretty_printer::url_format): ... this, and change to enum.
+ * pretty-print.c (pretty_printer::pretty_printer,
+ pp_begin_url, pp_end_url, test_urls): Adjust.
+ * doc/install.texi (--with-diagnostics-urls): Document the new
+ configuration option.
+ (--with-diagnostics-color): Document the existing interaction
+ with GCC_COLORS better.
+ * doc/invoke.texi (-fdiagnostics-urls): Add GCC_URLS and TERM_URLS
+ vindex reference. Update description of defaults based on the above.
+ (-fdiagnostics-color): Update description of how -fdiagnostics-color
+ interacts with GCC_COLORS.
+---
+ gcc/ChangeLog | 36 +++++++++++++++
+ gcc/config.in | 6 +++
+ gcc/configure | 41 ++++++++++++++++-
+ gcc/configure.ac | 28 ++++++++++++
+ gcc/diagnostic-color.c | 101 ++++++++++++++++++++++++++++++++++++++---
+ gcc/diagnostic-url.h | 18 +++++++-
+ gcc/diagnostic.c | 21 +++++++--
+ gcc/doc/install.texi | 15 ++++--
+ gcc/doc/invoke.texi | 39 ++++++++++++++--
+ gcc/pretty-print.c | 44 +++++++++++++++---
+ gcc/pretty-print.h | 5 +-
+ 11 files changed, 328 insertions(+), 26 deletions(-)
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index e6eb6ab4c21..22f990a3088 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config.in b/gcc/config.in
+index 48292861842..01fb18dbbb5 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/configure b/gcc/configure
+index 5fa565a40a4..f55cdb8c77f 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 671b9a67d81..0e6e475950d 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/diagnostic-color.c b/gcc/diagnostic-color.c
+index d5547952921..b1baded2c9e 100644
+--- a/gcc/diagnostic-color.c
++++ b/gcc/diagnostic-color.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/diagnostic-url.h b/gcc/diagnostic-url.h
+index 6be056941f1..d28460b928b 100644
+--- a/gcc/diagnostic-url.h
++++ b/gcc/diagnostic-url.h
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
+index 3386f070256..e4a08f76def 100644
+--- a/gcc/diagnostic.c
++++ b/gcc/diagnostic.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
+index 6ffafacff50..8ddebbb6267 100644
+--- a/gcc/doc/install.texi
++++ b/gcc/doc/install.texi
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index bd9ecebf103..597151670be 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c
+index 817c1059e08..dde138b0533 100644
+--- a/gcc/pretty-print.c
++++ b/gcc/pretty-print.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/pretty-print.h b/gcc/pretty-print.h
+index 001468c966e..22892f12ab7 100644
+--- a/gcc/pretty-print.h
++++ b/gcc/pretty-print.h
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== co-authored-by.patch ===
+From d7a65edb629a010f7ef907d457343abcb569fab7 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Thu, 16 Apr 2020 15:39:22 +0200
+Subject: [PATCH 1850/2034] List valid pairs for new and delete operators.
+
+ PR c++/94314
+ * cgraphclones.c (set_new_clone_decl_and_node_flags): Drop
+ DECL_IS_REPLACEABLE_OPERATOR during cloning.
+ * tree-ssa-dce.c (valid_new_delete_pair_p): New function.
+ (propagate_necessity): Check operator names.
+
+ PR c++/94314
+ * g++.dg/pr94314.C: Do not use dg-additional-options
+ and remove not needed stdio.h include.
+ * g++.dg/pr94314-2.C: Likewise.
+ * g++.dg/pr94314-3.C: Likewise.
+ * g++.dg/pr94314-4.C: New test.
+
+co-authored-By: Jakub Jelinek <jakub@redhat.com>
+Co-Authored-by: John Miller <jm@example.com>
+co-authored-by: John Miller2 <jm2@example.com>
+---
+ gcc/ChangeLog | 9 +++
+ gcc/cgraphclones.c | 2 +
+ gcc/testsuite/ChangeLog | 10 ++++
+ gcc/testsuite/g++.dg/pr94314-2.C | 5 +-
+ gcc/testsuite/g++.dg/pr94314-3.C | 5 +-
+ gcc/testsuite/g++.dg/pr94314-4.C | 30 ++++++++++
+ gcc/testsuite/g++.dg/pr94314.C | 5 +-
+ gcc/tree-ssa-dce.c | 98 ++++++++++++++++++++++++++++----
+ 8 files changed, 142 insertions(+), 22 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/pr94314-4.C
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 74dbeeb44c6..9e499ec9c86 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
+index c73b8f810f0..8f541a28b6e 100644
+--- a/gcc/cgraphclones.c
++++ b/gcc/cgraphclones.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 756f1d759e6..94d2312022d 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/pr94314-2.C b/gcc/testsuite/g++.dg/pr94314-2.C
+index 36b93ed6d4d..998ce601767 100644
+--- a/gcc/testsuite/g++.dg/pr94314-2.C
++++ b/gcc/testsuite/g++.dg/pr94314-2.C
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/pr94314-3.C b/gcc/testsuite/g++.dg/pr94314-3.C
+index 575ba9d8ad8..846a5d6a3d8 100644
+--- a/gcc/testsuite/g++.dg/pr94314-3.C
++++ b/gcc/testsuite/g++.dg/pr94314-3.C
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/pr94314-4.C b/gcc/testsuite/g++.dg/pr94314-4.C
+new file mode 100644
+index 00000000000..d097f29d4ad
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/pr94314-4.C
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/g++.dg/pr94314.C b/gcc/testsuite/g++.dg/pr94314.C
+index 86e651d10ba..4e5ae122e9f 100644
+--- a/gcc/testsuite/g++.dg/pr94314.C
++++ b/gcc/testsuite/g++.dg/pr94314.C
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
+index fd5f24c746c..757cfad5b5e 100644
+--- a/gcc/tree-ssa-dce.c
++++ b/gcc/tree-ssa-dce.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 1699-combine-Fix-split_i2i3-ICE-PR94291.patch ===
+From c23c899aedf11069e992eed7358802b262d62f98 Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Tue, 7 Apr 2020 21:30:12 +0200
+Subject: [PATCH 1699/2034] combine: Fix split_i2i3 ICE [PR94291]
+
+The following testcase ICEs on armv7hl-linux-gnueabi.
+try_combine is called on:
+(gdb) p debug_rtx (i3)
+(insn 20 12 22 2 (set (mem/c:SI (plus:SI (reg/f:SI 102 sfp)
+ (const_int -4 [0xfffffffffffffffc])) [1 x+0 S4 A32])
+ (reg:SI 125)) "pr94291.c":7:8 241 {*arm_movsi_insn}
+ (expr_list:REG_DEAD (reg:SI 125)
+ (nil)))
+(gdb) p debug_rtx (i2)
+(insn 12 7 20 2 (parallel [
+ (set (reg:CC 100 cc)
+ (compare:CC (reg:SI 121 [ <retval> ])
+ (const_int 0 [0])))
+ (set (reg:SI 125)
+ (reg:SI 121 [ <retval> ]))
+ ]) "pr94291.c":7:8 248 {*movsi_compare0}
+ (expr_list:REG_UNUSED (reg:CC 100 cc)
+ (nil)))
+and tries to recognize cc = r121 cmp 0; [sfp-4] = r121 parallel,
+but that isn't recognized, so it splits it into two: split_i2i3
+[sfp-4] = r121 followed by cc = r121 cmp 0 which is recognized, but
+ICEs because the code below insist that the SET_DEST of newi2pat
+(or first set in PARALLEL thereof) must be a REG or SUBREG of REG,
+but it is a MEM in this case. I don't see any condition that would
+guarantee that, perhaps for the swap_i2i3 case it was somehow guaranteed.
+
+As the code just wants to update LOG_LINKS and LOG_LINKS are only for
+registers, not for MEM or anything else, the patch just doesn't update those
+if it isn't a REG or SUBREG of REG.
+
+2020-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/94291
+ PR rtl-optimization/84169
+ * combine.c (try_combine): For split_i2i3, don't assume SET_DEST
+ must be a REG or SUBREG of REG; if it is not one of these, don't
+ update LOG_LINKs.
+
+ * gcc.dg/pr94291.c: New test.
+---
+ gcc/ChangeLog | 8 +++++++
+ gcc/combine.c | 42 +++++++++++++++++++---------------
+ gcc/testsuite/ChangeLog | 6 +++++
+ gcc/testsuite/gcc.dg/pr94291.c | 14 ++++++++++++
+ 4 files changed, 51 insertions(+), 19 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.dg/pr94291.c
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index a1ab9fb4ef3..12803e90b0a 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/combine.c b/gcc/combine.c
+index 58366a6d331..cff76cd3303 100644
+--- a/gcc/combine.c
++++ b/gcc/combine.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 71b5a14bcbe..3cbf891d58d 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.dg/pr94291.c b/gcc/testsuite/gcc.dg/pr94291.c
+new file mode 100644
+index 00000000000..7daa2b01166
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr94291.c
+@@ -0,0 +1 @@
++
+--
+2.26.1
+
+=== 0001-Add-patch_area_size-and-patch_area_entry-to-crtl.patch ===
+From 6607bdd99994c834f92fce924abdaea3405f62dc Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Fri, 1 May 2020 21:03:10 -0700
+Subject: [PATCH] Add patch_area_size and patch_area_entry to crtl
+
+Currently patchable area is at the wrong place. It is placed immediately
+after function label and before .cfi_startproc. A backend should be able
+to add a pseudo patchable area instruction durectly into RTL. This patch
+adds patch_area_size and patch_area_entry to crtl so that the patchable
+area info is available in RTL passes.
+
+It also limits patch_area_size and patch_area_entry to 65535, which is
+a reasonable maximum size for patchable area.
+
+gcc/
+
+ PR target/93492
+ * cfgexpand.c (pass_expand::execute): Set crtl->patch_area_size
+ and crtl->patch_area_entry.
+ * emit-rtl.h (rtl_data): Add patch_area_size and patch_area_entry.
+ * opts.c (common_handle_option): Limit
+ function_entry_patch_area_size and function_entry_patch_area_start
+ to USHRT_MAX. Fix a typo in error message.
+ * varasm.c (assemble_start_function): Use crtl->patch_area_size
+ and crtl->patch_area_entry.
+ * doc/invoke.texi: Document the maximum value for
+ -fpatchable-function-entry.
+
+gcc/c-family/
+
+ PR target/12345
+ * c-attribs.c (handle_patchable_function_entry_attribute): Limit
+ value to USHRT_MAX (65535).
+
+---
+ gcc/ChangeLog | 14 ++++++++
+ gcc/c-family/ChangeLog | 6 ++++
+ gcc/c-family/c-attribs.c | 9 +++++
+ gcc/cfgexpand.c | 33 +++++++++++++++++++
+ gcc/doc/invoke.texi | 1 +
+ gcc/emit-rtl.h | 6 ++++
+ gcc/opts.c | 4 ++-
+ gcc/testsuite/ChangeLog | 7 ++++
+ .../patchable_function_entry-error-1.c | 9 +++++
+ .../patchable_function_entry-error-2.c | 9 +++++
+ .../patchable_function_entry-error-3.c | 17 ++++++++++
+ gcc/varasm.c | 30 ++---------------
+ 12 files changed, 116 insertions(+), 29 deletions(-)
+ create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c
+ create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c
+ create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index e85a8e8813e..fb776ba5a0e 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
+index c429b49e68c..69ea1fdc4f3 100644
+--- a/gcc/c-family/ChangeLog
++++ b/gcc/c-family/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c
+index ac936d5bbbb..a101312c581 100644
+--- a/gcc/c-family/c-attribs.c
++++ b/gcc/c-family/c-attribs.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
+index a7ec77d5c85..86efa22bf60 100644
+--- a/gcc/cfgexpand.c
++++ b/gcc/cfgexpand.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 527d362533a..767d1f07801 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/emit-rtl.h b/gcc/emit-rtl.h
+index a878efe3cf7..3d6565c8a30 100644
+--- a/gcc/emit-rtl.h
++++ b/gcc/emit-rtl.h
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/opts.c b/gcc/opts.c
+index c212a1a57dc..3dccef39701 100644
+--- a/gcc/opts.c
++++ b/gcc/opts.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 176aa117904..185f9ea725e 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c b/gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c
+new file mode 100644
+index 00000000000..f60bf46cfe3
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c b/gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c
+new file mode 100644
+index 00000000000..90f88c78be7
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c b/gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c
+new file mode 100644
+index 00000000000..4490e5c15ca
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/varasm.c b/gcc/varasm.c
+index 271a67abf56..f062e48071f 100644
+--- a/gcc/varasm.c
++++ b/gcc/varasm.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.2
+
+=== 1957-c-generic-lambda-forwarding-function-PR94546.patch ===
+From aedd04caa945260ea77fd22f29b77292f7dba72e Mon Sep 17 00:00:00 2001
+From: Jason Merrill <jason@redhat.com>
+Date: Wed, 22 Apr 2020 02:27:54 -0400
+Subject: [PATCH 1957/2034] c++: generic lambda forwarding function [PR94546]
+
+While instantiating test(Plot) we partially instantiate the generic lambda.
+We look at forward<T>(rest)... and see that it's just replacing parameter
+packs with new parameter packs and tries to do a direct substitution. But
+because register_parameter_specializations had built up a
+NONTYPE_ARGUMENT_PACK around the new parameter pack, the substitution
+failed. So let's not wrap it that way.
+
+gcc/cp/ChangeLog
+2020-04-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/94546
+ * pt.c (register_parameter_specializations): If the instantiation is
+ still a parameter pack, don't wrap it in a NONTYPE_ARGUMENT_PACK.
+ (tsubst_pack_expansion, tsubst_expr): Adjust.
+---
+ gcc/cp/ChangeLog | 7 +++++
+ gcc/cp/pt.c | 28 +++++++------------
+ .../g++.dg/cpp2a/lambda-generic-variadic20.C | 23 +++++++++++++++
+ 3 files changed, 40 insertions(+), 18 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C
+
+diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
+index 640e4948130..4b6691a77f0 100644
+--- a/gcc/cp/ChangeLog
++++ b/gcc/cp/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
+index 7bf249cee5c..2fe7b66707c 100644
+--- a/gcc/cp/pt.c
++++ b/gcc/cp/pt.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C b/gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C
+new file mode 100644
+index 00000000000..3d69dbb8e98
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C
+@@ -0,0 +1 @@
++
+--
+2.26.1
+
+=== 0030-PR-c-92746-ICE-with-noexcept-of-function-concept-che.patch ===
+From edabbec31e3bfc9a9757f80c8610706ed00e5a1a Mon Sep 17 00:00:00 2001
+From: Jason Merrill <jason@redhat.com>
+Date: Mon, 13 Jan 2020 18:13:46 -0500
+Subject: [PATCH 0030/2034] PR c++/92746 - ICE with noexcept of function
+ concept check.
+
+Another place that needs to specially handle Concepts TS function-style
+concepts.
+
+ * except.c (check_noexcept_r): Handle concept-check.
+---
+ gcc/cp/ChangeLog | 3 +++
+ gcc/cp/except.c | 2 ++
+ gcc/testsuite/g++.dg/concepts/fn-concept3.C | 6 ++++++
+ 3 files changed, 11 insertions(+)
+ create mode 100644 gcc/testsuite/g++.dg/concepts/fn-concept3.C
+
+diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
+index 59646c70fa4..4729e3d331d 100644
+--- a/gcc/cp/ChangeLog
++++ b/gcc/cp/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/cp/except.c b/gcc/cp/except.c
+index e073bd4d2bc..55b4b6af442 100644
+--- a/gcc/cp/except.c
++++ b/gcc/cp/except.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/concepts/fn-concept3.C b/gcc/testsuite/g++.dg/concepts/fn-concept3.C
+new file mode 100644
+index 00000000000..ecb7f6b12f7
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/concepts/fn-concept3.C
+@@ -0,0 +1 @@
++
+--
+2.26.1
+
+=== 0129-Add-PR-number-to-change-log.patch ===
+From f788c2d66a6ee1ded65dafccbc5e485d42af4808 Mon Sep 17 00:00:00 2001
+From: Richard Sandiford <richard.sandiford@arm.com>
+Date: Fri, 17 Jan 2020 12:22:58 +0000
+Subject: [PATCH 0129/2034] Add PR number to change log
+
+---
+ gcc/ChangeLog | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 6c6d586ca75..49ca5f92dec 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 0577-aarch64-Add-an-and.patch ===
+From bba0c624c8b1d6e54dc58091dd21b0c2ab000434 Mon Sep 17 00:00:00 2001
+From: Richard Sandiford <richard.sandiford@arm.com>
+Date: Mon, 3 Feb 2020 21:43:44 +0000
+Subject: [PATCH 0577/2034] aarch64: Add an and/ior-based movk pattern
+ [PR87763]
+
+This patch adds a second movk pattern that models the instruction
+as a "normal" and/ior operation rather than an insertion. It fixes
+the third insv_1.c failure in PR87763, which was a regression from
+GCC 8.
+
+2020-02-06 Richard Sandiford <richard.sandiford@arm.com>
+
+gcc/
+ PR target/87763
+ * config/aarch64/aarch64-protos.h (aarch64_movk_shift): Declare.
+ * config/aarch64/aarch64.c (aarch64_movk_shift): New function.
+ * config/aarch64/aarch64.md (aarch64_movk<mode>): New pattern.
+
+gcc/testsuite/
+ PR target/87763
+ * gcc.target/aarch64/movk_2.c: New test.
+---
+ gcc/ChangeLog | 7 ++
+ gcc/config/aarch64/aarch64-protos.h | 1 +
+ gcc/config/aarch64/aarch64.c | 24 +++++++
+ gcc/config/aarch64/aarch64.md | 17 +++++
+ gcc/testsuite/ChangeLog | 5 ++
+ gcc/testsuite/gcc.target/aarch64/movk_2.c | 78 +++++++++++++++++++++++
+ 6 files changed, 132 insertions(+)
+ create mode 100644 gcc/testsuite/gcc.target/aarch64/movk_2.c
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index efbbbf08225..cea8ffee99c 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
+index 24cc65a383a..d29975a8921 100644
+--- a/gcc/config/aarch64/aarch64-protos.h
++++ b/gcc/config/aarch64/aarch64-protos.h
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
+index 6581e4cb075..6a1b4099af1 100644
+--- a/gcc/config/aarch64/aarch64.c
++++ b/gcc/config/aarch64/aarch64.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
+index 90eebce85c0..9c1f17d0f85 100644
+--- a/gcc/config/aarch64/aarch64.md
++++ b/gcc/config/aarch64/aarch64.md
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 601bc336290..cdb26581b9c 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/aarch64/movk_2.c b/gcc/testsuite/gcc.target/aarch64/movk_2.c
+new file mode 100644
+index 00000000000..a0477ad5d42
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/aarch64/movk_2.c
+@@ -0,0 +1 @@
++
+--
+2.26.1
+
+=== 1975-S-390-Fix-several-test-cases.patch ===
+From 803596fe9591026a50b59ff961ebc114097677b5 Mon Sep 17 00:00:00 2001
+From: Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+Date: Tue, 10 Mar 2020 10:49:28 +0100
+Subject: [PATCH 1975/2034] S/390: Fix several test cases
+
+gcc/ChangeLog:
+
+2020-04-21 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * config/s390/s390.md ("*<risbg_n>_ior_and_sr_ze<mode>"): Lift from SI
+ mode to DSI. ("*trunc_sidi_and_subreg_ze<clobbercc_or_nocc>"): New
+ insn pattern.
+
+gcc/testsuite/ChangeLog:
+
+2020-04-21 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
+
+ * gcc.target/s390/addsub-signed-overflow-1.c: Fix options.
+ * gcc.target/s390/addsub-signed-overflow-2.c: Fix options.
+ * gcc.target/s390/bswap-1.c: Fix scan assembler regex.
+ * gcc.target/s390/global-array-element-pic2.c: Fix scan assembler regex.
+ * gcc.target/s390/load-relative-check.c: Fix options.
+ * gcc.target/s390/morestack.c: Fix options.
+ * gcc.target/s390/nobp-return-mem-z900.c: Temporarily silence this case.
+ * gcc.target/s390/risbg-ll-1.c: Fix scan assembler regex.
+ * gcc.target/s390/risbg-ll-2.c: Fix scan assembler regex.
+ * gcc.target/s390/risbg-ll-3.c: Fix scan assembler regex.
+ * gcc.target/s390/target-attribute/pr82012.c: Fix error message.
+---
+ gcc/config/s390/s390.md | 39 ++++++++++++-------
+ .../s390/addsub-signed-overflow-1.c | 2 +-
+ .../s390/addsub-signed-overflow-2.c | 2 +-
+ gcc/testsuite/gcc.target/s390/bswap-1.c | 8 ++--
+ .../s390/global-array-element-pic2.c | 4 +-
+ .../gcc.target/s390/load-relative-check.c | 2 +-
+ gcc/testsuite/gcc.target/s390/morestack.c | 2 +-
+ .../gcc.target/s390/nobp-return-mem-z900.c | 17 ++++++--
+ gcc/testsuite/gcc.target/s390/risbg-ll-1.c | 13 +++----
+ gcc/testsuite/gcc.target/s390/risbg-ll-2.c | 6 +--
+ gcc/testsuite/gcc.target/s390/risbg-ll-3.c | 2 +-
+ .../s390/target-attribute/pr82012.c | 2 +-
+ 12 files changed, 59 insertions(+), 40 deletions(-)
+
+diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
+index 44b59659e20..cf53ef1b791 100644
+--- a/gcc/config/s390/s390.md
++++ b/gcc/config/s390/s390.md
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/s390/addsub-signed-overflow-1.c b/gcc/testsuite/gcc.target/s390/addsub-signed-overflow-1.c
+index 143220d5541..ebc02479587 100644
+--- a/gcc/testsuite/gcc.target/s390/addsub-signed-overflow-1.c
++++ b/gcc/testsuite/gcc.target/s390/addsub-signed-overflow-1.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/s390/addsub-signed-overflow-2.c b/gcc/testsuite/gcc.target/s390/addsub-signed-overflow-2.c
+index 798e489cece..8bd1a764bc6 100644
+--- a/gcc/testsuite/gcc.target/s390/addsub-signed-overflow-2.c
++++ b/gcc/testsuite/gcc.target/s390/addsub-signed-overflow-2.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/s390/bswap-1.c b/gcc/testsuite/gcc.target/s390/bswap-1.c
+index edfcdf888c0..c11a0ea780b 100644
+--- a/gcc/testsuite/gcc.target/s390/bswap-1.c
++++ b/gcc/testsuite/gcc.target/s390/bswap-1.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/s390/global-array-element-pic2.c b/gcc/testsuite/gcc.target/s390/global-array-element-pic2.c
+index b9398a8042f..72b87d40b85 100644
+--- a/gcc/testsuite/gcc.target/s390/global-array-element-pic2.c
++++ b/gcc/testsuite/gcc.target/s390/global-array-element-pic2.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/s390/load-relative-check.c b/gcc/testsuite/gcc.target/s390/load-relative-check.c
+index 3d4671a6b3f..a55bc2442f1 100644
+--- a/gcc/testsuite/gcc.target/s390/load-relative-check.c
++++ b/gcc/testsuite/gcc.target/s390/load-relative-check.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/s390/morestack.c b/gcc/testsuite/gcc.target/s390/morestack.c
+index aa28b72aa6c..4cfa220e737 100644
+--- a/gcc/testsuite/gcc.target/s390/morestack.c
++++ b/gcc/testsuite/gcc.target/s390/morestack.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/s390/nobp-return-mem-z900.c b/gcc/testsuite/gcc.target/s390/nobp-return-mem-z900.c
+index 0b318115a8f..3d6aca1f95f 100644
+--- a/gcc/testsuite/gcc.target/s390/nobp-return-mem-z900.c
++++ b/gcc/testsuite/gcc.target/s390/nobp-return-mem-z900.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/s390/risbg-ll-1.c b/gcc/testsuite/gcc.target/s390/risbg-ll-1.c
+index 30350d04c45..1cac15820c0 100644
+--- a/gcc/testsuite/gcc.target/s390/risbg-ll-1.c
++++ b/gcc/testsuite/gcc.target/s390/risbg-ll-1.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/s390/risbg-ll-2.c b/gcc/testsuite/gcc.target/s390/risbg-ll-2.c
+index 754c17311dd..8bf1a0ff88b 100644
+--- a/gcc/testsuite/gcc.target/s390/risbg-ll-2.c
++++ b/gcc/testsuite/gcc.target/s390/risbg-ll-2.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/s390/risbg-ll-3.c b/gcc/testsuite/gcc.target/s390/risbg-ll-3.c
+index 2a2db543cd9..90d37f2c1ce 100644
+--- a/gcc/testsuite/gcc.target/s390/risbg-ll-3.c
++++ b/gcc/testsuite/gcc.target/s390/risbg-ll-3.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/pr82012.c b/gcc/testsuite/gcc.target/s390/target-attribute/pr82012.c
+index 2e1f7ae57be..ad1bf76d4d2 100644
+--- a/gcc/testsuite/gcc.target/s390/target-attribute/pr82012.c
++++ b/gcc/testsuite/gcc.target/s390/target-attribute/pr82012.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 1999-rs6000-Fix-C-14-vs.-C-17-ABI-bug-on-powerpc64le-PR94.patch ===
+From a39ed81b8a0b46320a7c6ece3f7ad4c3f8519609 Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Thu, 23 Apr 2020 09:59:57 +0200
+Subject: [PATCH 1999/2034] rs6000: Fix C++14 vs. C++17 ABI bug on powerpc64le
+ [PR94707]
+
+As mentioned in the PR and on IRC, the recently added struct-layout-1.exp
+new tests FAIL on powerpc64le-linux (among other targets).
+FAIL: tmpdir-g++.dg-struct-layout-1/t032 cp_compat_x_tst.o-cp_compat_y_tst.o execute
+FAIL: tmpdir-g++.dg-struct-layout-1/t058 cp_compat_x_tst.o-cp_compat_y_tst.o execute
+FAIL: tmpdir-g++.dg-struct-layout-1/t059 cp_compat_x_tst.o-cp_compat_y_tst.o execute
+in particular. The problem is that the presence or absence of the C++17
+artificial empty base fields, which have non-zero TYPE_SIZE, but zero
+DECL_SIZE, change the ABI decisions, if it is present (-std=c++17), the type
+might not be considered homogeneous, while if it is absent (-std=c++14), it
+can be.
+
+The following patch fixes that and emits a -Wpsabi inform; perhaps more
+often than it could, because the fact that rs6000_discover_homogeneous_aggregate
+returns true when it didn't in in GCC 7/8/9 with -std=c++17 doesn't still
+mean it will make a different ABI decision, but the warning triggered only
+on the test I've changed (the struct-layout-1.exp tests use -w -Wno-psabi
+already).
+
+2020-04-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/94707
+ * config/rs6000/rs6000-call.c (rs6000_aggregate_candidate): Add
+ cxx17_empty_base_seen argument. Pass it to recursive calls.
+ Ignore cxx17_empty_base_field_p fields after setting
+ *cxx17_empty_base_seen to true.
+ (rs6000_discover_homogeneous_aggregate): Adjust
+ rs6000_aggregate_candidate caller. With -Wpsabi, diagnose homogeneous
+ aggregates with C++17 empty base fields.
+
+ * g++.dg/tree-ssa/pr27830.C: Use -Wpsabi -w for -std=c++17 and higher.
+---
+ gcc/ChangeLog | 13 ++++++++++
+ gcc/config/rs6000/rs6000-call.c | 34 +++++++++++++++++++++----
+ gcc/testsuite/ChangeLog | 3 +++
+ gcc/testsuite/g++.dg/tree-ssa/pr27830.C | 2 ++
+ 4 files changed, 47 insertions(+), 5 deletions(-)
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 06f7eda0033..93c3076eb86 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
+index e08621ace27..a9ae7ab70ca 100644
+--- a/gcc/config/rs6000/rs6000-call.c
++++ b/gcc/config/rs6000/rs6000-call.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 684e408c1a5..245c1512c76 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr27830.C b/gcc/testsuite/g++.dg/tree-ssa/pr27830.C
+index 01c7fc18783..551ebc428cd 100644
+--- a/gcc/testsuite/g++.dg/tree-ssa/pr27830.C
++++ b/gcc/testsuite/g++.dg/tree-ssa/pr27830.C
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== 0001-Add-patch_area_size-and-patch_area_entry-to-crtl.patch ===
+From 6607bdd99994c834f92fce924abdaea3405f62dc Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Fri, 1 May 2020 21:03:10 -0700
+Subject: [PATCH] Add patch_area_size and patch_area_entry to crtl
+
+Currently patchable area is at the wrong place. It is placed immediately
+after function label and before .cfi_startproc. A backend should be able
+to add a pseudo patchable area instruction durectly into RTL. This patch
+adds patch_area_size and patch_area_entry to crtl so that the patchable
+area info is available in RTL passes.
+
+It also limits patch_area_size and patch_area_entry to 65535, which is
+a reasonable maximum size for patchable area.
+
+gcc/
+
+ PR target/93492
+ * cfgexpand.c (pass_expand::execute): Set crtl->patch_area_size
+ and crtl->patch_area_entry.
+ * emit-rtl.h (rtl_data): Add patch_area_size and patch_area_entry.
+ * opts.c (common_handle_option): Limit
+ function_entry_patch_area_size and function_entry_patch_area_start
+ to USHRT_MAX. Fix a typo in error message.
+ * varasm.c (assemble_start_function): Use crtl->patch_area_size
+ and crtl->patch_area_entry.
+ * doc/invoke.texi: Document the maximum value for
+ -fpatchable-function-entry.
+
+gcc/c-family/
+
+ PR target/12345
+ * c-attribs.c (handle_patchable_function_entry_attribute): Limit
+ value to USHRT_MAX (65535).
+
+---
+ gcc/ChangeLog | 14 ++++++++
+ gcc/c-family/ChangeLog | 6 ++++
+ gcc/c-family/c-attribs.c | 9 +++++
+ gcc/cfgexpand.c | 33 +++++++++++++++++++
+ gcc/doc/invoke.texi | 1 +
+ gcc/emit-rtl.h | 6 ++++
+ gcc/opts.c | 4 ++-
+ gcc/testsuite/ChangeLog | 7 ++++
+ .../patchable_function_entry-error-1.c | 9 +++++
+ .../patchable_function_entry-error-2.c | 9 +++++
+ .../patchable_function_entry-error-3.c | 17 ++++++++++
+ gcc/varasm.c | 30 ++---------------
+ 12 files changed, 116 insertions(+), 29 deletions(-)
+ create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c
+ create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c
+ create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index e85a8e8813e..fb776ba5a0e 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
+index c429b49e68c..69ea1fdc4f3 100644
+--- a/gcc/c-family/ChangeLog
++++ b/gcc/c-family/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c
+index ac936d5bbbb..a101312c581 100644
+--- a/gcc/c-family/c-attribs.c
++++ b/gcc/c-family/c-attribs.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
+index a7ec77d5c85..86efa22bf60 100644
+--- a/gcc/cfgexpand.c
++++ b/gcc/cfgexpand.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 527d362533a..767d1f07801 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/emit-rtl.h b/gcc/emit-rtl.h
+index a878efe3cf7..3d6565c8a30 100644
+--- a/gcc/emit-rtl.h
++++ b/gcc/emit-rtl.h
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/opts.c b/gcc/opts.c
+index c212a1a57dc..3dccef39701 100644
+--- a/gcc/opts.c
++++ b/gcc/opts.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 176aa117904..185f9ea725e 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c b/gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c
+new file mode 100644
+index 00000000000..f60bf46cfe3
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c b/gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c
+new file mode 100644
+index 00000000000..90f88c78be7
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c b/gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c
+new file mode 100644
+index 00000000000..4490e5c15ca
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/varasm.c b/gcc/varasm.c
+index 271a67abf56..f062e48071f 100644
+--- a/gcc/varasm.c
++++ b/gcc/varasm.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.2
+
+=== 0002-Bump-date.patch ===
+From a139bafeec76732d964b99e8be3d61b3cab0359d Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Tue, 12 May 2020 09:27:51 +0200
+Subject: [PATCH 2/2] Bump date.
+
+---
+ gcc/DATESTAMP | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
+index c3d42a6f89a..b03d4a0feab 100644
+--- a/gcc/DATESTAMP
++++ b/gcc/DATESTAMP
+@@ -1 +1,2 @@
+
++
+--
+2.26.2
+
+=== 0001-Just-test-it.patch ===
+From 6b10b909c0b49ac7ace2cd53021b3ff7ffb2d3f4 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Tue, 12 May 2020 09:25:54 +0200
+Subject: [PATCH 1/2] Just test it.
+
+gcc/ChangeLog:
+
+2020-05-12 Martin Liska <mliska@suse.cz>
+
+ PR ipa/12345
+ * tree-vrp.c: Done.
+ * tree.c: Done.
+---
+ gcc/tree-vrp.c | 2 ++
+ gcc/tree.c | 3 +++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
+index a8861670790..32722d2c714 100644
+--- a/gcc/tree-vrp.c
++++ b/gcc/tree-vrp.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/tree.c b/gcc/tree.c
+index 0ddf002e9eb..fa7c6b28a4e 100644
+--- a/gcc/tree.c
++++ b/gcc/tree.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.2
+
+=== trailing-whitespaces.patch ===
+From eb7c7c524556df5364f03adc20f6a9db20858484 Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Mon, 13 Jan 2020 14:14:57 +0100
+Subject: [PATCH 0004/2034] tree-opt: Fix bootstrap failure in
+ tree-ssa-forwprop.c some more PR90838
+
+2020-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/90838
+ * tree-ssa-forwprop.c (simplify_count_trailing_zeroes): Use
+ SCALAR_INT_TYPE_MODE directly in CTZ_DEFINED_VALUE_AT_ZERO macro
+ argument rather than to initialize temporary for targets that
+ don't use the mode argument at all. Initialize ctzval to avoid
+ warning at -O0.
+---
+ gcc/ChangeLog | 9 +++++++++
+ gcc/tree-ssa-forwprop.c | 6 +++---
+ 2 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index a195863212e..f7df07343d1 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
+index aac31d02b6c..56c470f6ecf 100644
+--- a/gcc/tree-ssa-forwprop.c
++++ b/gcc/tree-ssa-forwprop.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.1
+
+=== pr-check1.patch ===
+From 5194b51ed9714808d88827531e91474895b6c706 Mon Sep 17 00:00:00 2001
+From: Jason Merrill <jason@redhat.com>
+Date: Thu, 16 Jan 2020 16:55:39 -0500
+Subject: [PATCH 0121/2034] PR c++/93286 - ICE with __is_constructible and
+ variadic template.
+
+Here we had been recursing in tsubst_copy_and_build if type2 was a TREE_LIST
+because that function knew how to deal with pack expansions, and tsubst
+didn't. But tsubst_copy_and_build expects to be dealing with expressions,
+so we crash when trying to convert_from_reference a type.
+
+gcc/cp/ChangeLog:
+ PR ipa/12345
+ * pt.c (tsubst) [TREE_LIST]: Handle pack expansion.
+ (tsubst_copy_and_build) [TRAIT_EXPR]: Always use tsubst for type2.
+
+gcc/testsuite/ChangeLog:
+ * g++.dg/ext/is_constructible4.C: New file.
+---
+ gcc/cp/ChangeLog | 4 ++
+ gcc/cp/pt.c | 74 ++++++++++++++++++--
+ gcc/testsuite/g++.dg/ext/is_constructible4.C | 18 +++++
+ 3 files changed, 89 insertions(+), 7 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/ext/is_constructible4.C
+
+diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
+index 3ca5d7a11b4..c37e461bcc5 100644
+--- a/gcc/cp/ChangeLog
++++ b/gcc/cp/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
+index 9bb8cc13e5f..872f8ff8f52 100644
+--- a/gcc/cp/pt.c
++++ b/gcc/cp/pt.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/ext/is_constructible4.C b/gcc/testsuite/g++.dg/ext/is_constructible4.C
+new file mode 100644
+index 00000000000..6dfe3c01661
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/ext/is_constructible4.C
+@@ -0,0 +1 @@
++
+--
+2.26.1
+
+=== 0020-IPA-Avoid-segfault-in-devirtualization_time_bonus-PR.patch ===
+From 8472660b98a31b32b7d030c2cdc4d41d326364d5 Mon Sep 17 00:00:00 2001
+From: Martin Jambor <mjambor@suse.cz>
+Date: Mon, 13 Jan 2020 19:13:46 +0100
+Subject: [PATCH 0020/2034] IPA: Avoid segfault in devirtualization_time_bonus
+ (PR 93223)
+
+2020-01-13 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/93223
+ * ipa-cp.c (devirtualization_time_bonus): Check whether isummary is
+ NULL.
+
+ testsuite/
+ * g++.dg/ipa/pr93223.C: New test.
+---
+ gcc/ipa-cp.c | 2 +-
+ gcc/testsuite/g++.dg/ipa/pr93223.C | 62 ++++++++++++++++++++++++++++++
+ 2 files changed, 63 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/g++.dg/ipa/pr93223.C
+
+diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
+index 612f3d0a89b..17da1d8e8a7 100644
+--- a/gcc/ipa-cp.c
++++ b/gcc/ipa-cp.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/ipa/pr93223.C b/gcc/testsuite/g++.dg/ipa/pr93223.C
+new file mode 100644
+index 00000000000..87f98b5e244
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/ipa/pr93223.C
+@@ -0,0 +1 @@
++
+--
+2.26.1
+
+=== 0043-Compare-TREE_ADDRESSABLE-and-TYPE_MODE-when-ODR-chec.patch ===
+From 288c5324bf6e418dd94d718d1619464a4f68ff8e Mon Sep 17 00:00:00 2001
+From: Jan Hubicka <jh@suse.cz>
+Date: Tue, 14 Jan 2020 21:45:03 +0100
+Subject: [PATCH 0043/2034] Compare TREE_ADDRESSABLE and TYPE_MODE when ODR
+ checking types.
+
+ PR lto/91576
+ * ipa-devirt.c (odr_types_equivalent_p): Compare TREE_ADDRESSABLE and
+ TYPE_MODE.
+
+ * testsuite/g++.dg/lto/odr-8_0.C: New testcase.
+ * testsuite/g++.dg/lto/odr-8_1.C: New testcase.
+---
+ gcc/ChangeLog | 6 ++++++
+ gcc/ipa-devirt.c | 21 +++++++++++++++++++++
+ gcc/testsuite/ChangeLog | 6 ++++++
+ gcc/testsuite/g++.dg/lto/odr-8_0.C | 7 +++++++
+ gcc/testsuite/g++.dg/lto/odr-8_1.C | 12 ++++++++++++
+ 5 files changed, 52 insertions(+)
+ create mode 100644 gcc/testsuite/g++.dg/lto/odr-8_0.C
+ create mode 100644 gcc/testsuite/g++.dg/lto/odr-8_1.C
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 38165123654..33ca91a6467 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
+index f0031957375..b609a77701d 100644
+--- a/gcc/ipa-devirt.c
++++ b/gcc/ipa-devirt.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 8e3b9105188..dc42601794b 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/g++.dg/lto/odr-8_0.C b/gcc/testsuite/g++.dg/lto/odr-8_0.C
+new file mode 100644
+index 00000000000..59f51399fac
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/lto/odr-8_0.C
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/g++.dg/lto/odr-8_1.C b/gcc/testsuite/g++.dg/lto/odr-8_1.C
+new file mode 100644
+index 00000000000..742df8cc906
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/lto/odr-8_1.C
+@@ -0,0 +1 @@
++
+--
+2.26.1
+
+=== 0096-GCC-PATCH-AArch64-Add-ACLE-intrinsics-for-dot-produc.patch ===
+From 8c197c851e7528baba7cb837f34c05ba2242f705 Mon Sep 17 00:00:00 2001
+From: Stam Markianos-Wright <stam.markianos-wright@arm.com>
+Date: Thu, 16 Jan 2020 14:20:48 +0000
+Subject: [PATCH 0096/2034] [GCC][PATCH][AArch64]Add ACLE intrinsics for dot
+ product (usdot - vector, <us/su>dot - by element) for AArch64 AdvSIMD ARMv8.6
+ Extension
+
+gcc/ChangeLog:
+
+2020-01-16 Stam Markianos-Wright <stam.markianos-wright@arm.com>
+
+ * config/aarch64/aarch64-builtins.c: (enum aarch64_type_qualifiers):
+ New qualifier_lane_quadtup_index, TYPES_TERNOP_SSUS,
+ TYPES_QUADOPSSUS_LANE_QUADTUP, TYPES_QUADOPSSSU_LANE_QUADTUP.
+ (aarch64_simd_expand_args): Add case SIMD_ARG_LANE_QUADTUP_INDEX.
+ (aarch64_simd_expand_builtin): Add qualifier_lane_quadtup_index.
+ * config/aarch64/aarch64-simd-builtins.def (usdot, usdot_lane,
+ usdot_laneq, sudot_lane,sudot_laneq): New.
+ * config/aarch64/aarch64-simd.md (aarch64_usdot): New.
+ (aarch64_<sur>dot_lane): New.
+ * config/aarch64/arm_neon.h (vusdot_s32): New.
+ (vusdotq_s32): New.
+ (vusdot_lane_s32): New.
+ (vsudot_lane_s32): New.
+ * config/aarch64/iterators.md (DOTPROD_I8MM): New iterator.
+ (UNSPEC_USDOT, UNSPEC_SUDOT): New unspecs.
+
+gcc/testsuite/ChangeLog:
+
+2020-01-16 Stam Markianos-Wright <stam.markianos-wright@arm.com>
+
+ * gcc.target/aarch64/advsimd-intrinsics/vdot-compile-3-1.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vdot-compile-3-2.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vdot-compile-3-3.c: New test.
+ * gcc.target/aarch64/advsimd-intrinsics/vdot-compile-3-4.c: New test.
+---
+ gcc/ChangeLog | 18 +++
+ gcc/config/aarch64/aarch64-builtins.c | 45 +++++-
+ gcc/config/aarch64/aarch64-simd-builtins.def | 5 +
+ gcc/config/aarch64/aarch64-simd.md | 34 +++++
+ gcc/config/aarch64/arm_neon.h | 83 +++++++++++
+ gcc/config/aarch64/iterators.md | 7 +
+ gcc/testsuite/ChangeLog | 7 +
+ .../aarch64/advsimd-intrinsics/vdot-3-1.c | 136 +++++++++++++++++
+ .../aarch64/advsimd-intrinsics/vdot-3-2.c | 137 ++++++++++++++++++
+ .../aarch64/advsimd-intrinsics/vdot-3-3.c | 31 ++++
+ .../aarch64/advsimd-intrinsics/vdot-3-4.c | 31 ++++
+ 11 files changed, 531 insertions(+), 3 deletions(-)
+ create mode 100755 gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c
+ create mode 100755 gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c
+ create mode 100755 gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-3.c
+ create mode 100755 gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-4.c
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 9a949980699..49dcecb6777 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c
+index f0e0461b7f0..f50c4857e1c 100644
+--- a/gcc/config/aarch64/aarch64-builtins.c
++++ b/gcc/config/aarch64/aarch64-builtins.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/aarch64/aarch64-simd-builtins.def b/gcc/config/aarch64/aarch64-simd-builtins.def
+index 57fc5933b43..4744dd1f6b2 100644
+--- a/gcc/config/aarch64/aarch64-simd-builtins.def
++++ b/gcc/config/aarch64/aarch64-simd-builtins.def
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
+index 2989096b170..9e56e8caf35 100644
+--- a/gcc/config/aarch64/aarch64-simd.md
++++ b/gcc/config/aarch64/aarch64-simd.md
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h
+index eaba156e26c..c96214003dd 100644
+--- a/gcc/config/aarch64/arm_neon.h
++++ b/gcc/config/aarch64/arm_neon.h
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md
+index b9843b83c5f..83720d9802a 100644
+--- a/gcc/config/aarch64/iterators.md
++++ b/gcc/config/aarch64/iterators.md
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
+index 0d8aa6063a7..8b01aa06a40 100644
+--- a/gcc/testsuite/ChangeLog
++++ b/gcc/testsuite/ChangeLog
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c
+new file mode 100755
+index 00000000000..ac4f821e771
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c
+new file mode 100755
+index 00000000000..96bca2356e4
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-3.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-3.c
+new file mode 100755
+index 00000000000..18ecabef8dc
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-3.c
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-4.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-4.c
+new file mode 100755
+index 00000000000..66c87d48694
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-4.c
+@@ -0,0 +1 @@
++
+--
+2.26.1
+
+=== 0001-c-Alias.patch ===
+From 3f1a149fc35cdba988464562e2fb824b10652d6b Mon Sep 17 00:00:00 2001
+From: Nathan Sidwell <nathan@acm.org>
+Date: Tue, 19 May 2020 13:29:19 -0700
+Subject: [PATCH] c++: Alias template instantiation template info
+
+I discovered that the alias instantiation machinery would setup
+template_info, and then sometime later overwrite that with equivalent
+info. This broke modules, because the template info, once set, is
+logically immutable. Let's just not do that.
+
+ * pt.c (lookup_template_class_1): Do not reinit template_info of an
+ alias here.
+
+(cherry picked from commit 74744bb1f2847b5b9ce3e97e0fec9c23bb0e499f)
+---
+ gcc/cp/pt.c | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
+index b8f03d18541..7230ac724ba 100644
+--- a/gcc/cp/pt.c
++++ b/gcc/cp/pt.c
+@@ -1 +1,2 @@
+
++
+--
+2.26.2
+=== 0001-RISC-V-Make-unique.patch ===
+From adce62f53d8ad00e8110a6a2de7962d7a850de16 Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Wed, 29 Apr 2020 09:49:56 -0700
+Subject: [PATCH] RISC-V: Make unique SECCAT_SRODATA names start with .srodata
+ (not .sdata2)
+
+default_unique_section uses ".sdata2" as a prefix for SECCAT_SRODATA
+unique sections, but RISC-V uses ".srodata" instead. Override the
+TARGET_ASM_UNIQUE_SECTION function to catch this case, allowing the
+default to be used for all other sections.
+
+gcc/
+ * config/riscv/riscv.c (riscv_unique_section): New.
+ (TARGET_ASM_UNIQUE_SECTION): New.
+
+Signed-off-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Keith Packard <keithp@keithp.com>
+Reviewed-on: Keith Packard <keithp@keithp.com>
+Co-Authored-by: Keith Packard <keithp@keithp.com>
+Acked-By: Keith Packard <keithp@keithp.com>
+Tested-by: Keith Packard <keithp@keithp.com>
+Reported-by: Keith Packard <keithp@keithp.com>
+Suggested-by: Keith Packard <keithp@keithp.com>
+---
+ gcc/ChangeLog | 5 +++++
+ gcc/config/riscv/riscv.c | 40 ++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 45 insertions(+)
+
+diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
+index e4c08d780db..1ad9799fce4 100644
+--- a/gcc/config/riscv/riscv.c
++++ b/gcc/config/riscv/riscv.c
+@@ -1 +1,2 @@
+
++
+
+--
+2.26.2
+
+=== 0001-Fortran-ProcPtr-function.patch ===
+From eb069ae8819c3a84d7f78becc5501e21ee3a9554 Mon Sep 17 00:00:00 2001
+From: Mark Eggleston <markeggleston@gcc.gnu.org>
+Date: Thu, 7 May 2020 08:02:02 +0100
+Subject: [PATCH] Fortran : ProcPtr function results: 'ppr@' in error message
+ PR39695
+
+The value 'ppr@' is set in the name of result symbol, the actual
+name of the symbol is in the procedure name symbol pointed
+to by the result symbol's namespace (ns). When reporting errors for
+symbols that have the proc_pointer attribute check whether the
+result attribute is set and set the name accordingly.
+
+2020-05-20 Mark Eggleston <markeggleston@gcc.gnu.org>
+
+gcc/fortran/
+
+ PR fortran/39695
+ * resolve.c (resolve_fl_procedure): Set name depending on
+ whether the result attribute is set. For PROCEDURE/RESULT
+ conflict use the name in sym->ns->proc_name->name.
+ * symbol.c (gfc_add_type): Add check for function and result
+ attributes use sym->ns->proc_name->name if both are set.
+ Where the symbol cannot have a type use the name in
+ sym->ns->proc_name->name.
+
+2020-05-20 Mark Eggleston <markeggleston@gcc.gnu.org>
+
+gcc/testsuite/
+
+ PR fortran/39695
+ * gfortran.dg/pr39695_1.f90: New test.
+ * gfortran.dg/pr39695_2.f90: New test.
+ * gfortran.dg/pr39695_3.f90: New test.
+ * gfortran.dg/pr39695_4.f90: New test.
+---
+ gcc/fortran/ChangeLog | 11 +++++++++++
+ gcc/fortran/resolve.c | 6 ++++--
+ gcc/fortran/symbol.c | 7 +++++--
+ gcc/testsuite/ChangeLog | 8 ++++++++
+ gcc/testsuite/gfortran.dg/pr39695_1.f90 | 8 ++++++++
+ gcc/testsuite/gfortran.dg/pr39695_2.f90 | 12 ++++++++++++
+ gcc/testsuite/gfortran.dg/pr39695_3.f90 | 11 +++++++++++
+ gcc/testsuite/gfortran.dg/pr39695_4.f90 | 14 ++++++++++++++
+ 8 files changed, 73 insertions(+), 4 deletions(-)
+ create mode 100644 gcc/testsuite/gfortran.dg/pr39695_1.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/pr39695_2.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/pr39695_3.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/pr39695_4.f90
+
+diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
+index f6e10ea379c..aaee5eb6b9b 100644
+--- a/gcc/fortran/resolve.c
++++ b/gcc/fortran/resolve.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
+index 59f602d80d5..b96706138c9 100644
+--- a/gcc/fortran/symbol.c
++++ b/gcc/fortran/symbol.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gfortran.dg/pr39695_1.f90 b/gcc/testsuite/gfortran.dg/pr39695_1.f90
+new file mode 100644
+index 00000000000..4c4b3045f69
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/pr39695_1.f90
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/gfortran.dg/pr39695_2.f90 b/gcc/testsuite/gfortran.dg/pr39695_2.f90
+new file mode 100644
+index 00000000000..8534724959a
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/pr39695_2.f90
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/gfortran.dg/pr39695_3.f90 b/gcc/testsuite/gfortran.dg/pr39695_3.f90
+new file mode 100644
+index 00000000000..661e2540bb3
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/pr39695_3.f90
+@@ -0,0 +1 @@
++
+diff --git a/gcc/testsuite/gfortran.dg/pr39695_4.f90 b/gcc/testsuite/gfortran.dg/pr39695_4.f90
+new file mode 100644
+index 00000000000..ecb0a43929f
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/pr39695_4.f90
+@@ -0,0 +1 @@
++
+--
+2.26.2
+
+=== 0001-c-C-20-DR-2237.patch ===
+From 4b38d56dbac6742b038551a36ec80200313123a1 Mon Sep 17 00:00:00 2001
+From: Marek Polacek <polacek@redhat.com>
+Date: Sat, 4 Apr 2020 18:09:53 -0400
+Subject: [PATCH] c++: C++20 DR 2237, disallow simple-template-id in cdtor.
+
+This patch implements DR 2237 which says that a simple-template-id is
+no longer valid as the declarator-id of a constructor or destructor;
+see [diff.cpp17.class]#2. It is not explicitly stated but out-of-line
+destructors with a simple-template-id are also meant to be ill-formed
+now. (Out-of-line constructors like that are invalid since DR1435 I
+think.) This change only applies to C++20; it is not a DR against C++17.
+
+I'm not crazy about the diagnostic in constructors but ISTM that
+cp_parser_constructor_declarator_p shouldn't print errors.
+
+ DR 2237
+ * parser.c (cp_parser_unqualified_id): Reject simple-template-id as
+ the declarator-id of a destructor.
+---
+diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
+index a6a5d975af3..a8082d39aca 100644
+--- a/gcc/cp/parser.c
++++ b/gcc/cp/parser.c
+@@ -1 +1,2 @@
+
++
+
+=== 0001-go-in-ignored-location.patch ===
+From 81994eab700da7fea6644541c163aa0f0f3b8cf1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= <chigot.c@gmail.com>
+Date: Tue, 19 May 2020 16:03:54 +0200
+Subject: libgo: update x/sys/cpu after gccgo support added
+
+Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234597
+---
+ gcc/go/gofrontend/MERGE | 2 +-
+ .../sys/cpu/{cpu_aix_ppc64.go => cpu_aix.go} | 2 +-
+ .../golang.org/x/sys/cpu/syscall_aix_gccgo.go | 27 +++++++++++++++++++
+ 3 files changed, 29 insertions(+), 2 deletions(-)
+ rename libgo/go/golang.org/x/sys/cpu/{cpu_aix_ppc64.go => cpu_aix.go} (96%)
+ create mode 100644 libgo/go/golang.org/x/sys/cpu/syscall_aix_gccgo.go
+
+diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
+index bc9c1f07eda..284374820b0 100644
+--- a/gcc/go/gofrontend/MERGE
++++ b/gcc/go/gofrontend/MERGE
+@@ -1 +1,2 @@
+
++
+diff --git a/libgo/go/golang.org/x/sys/cpu/cpu_aix_ppc64.go b/libgo/go/golang.org/x/sys/cpu/cpu_aix.go
+similarity index 96%
+rename from libgo/go/golang.org/x/sys/cpu/cpu_aix_ppc64.go
+rename to libgo/go/golang.org/x/sys/cpu/cpu_aix.go
+index b0ede112d4e..02d03129e50 100644
+--- a/libgo/go/golang.org/x/sys/cpu/cpu_aix_ppc64.go
++++ b/libgo/go/golang.org/x/sys/cpu/cpu_aix.go
+@@ -1 +1,2 @@
+
++
+diff --git a/libgo/go/golang.org/x/sys/cpu/syscall_aix_gccgo.go b/libgo/go/golang.org/x/sys/cpu/syscall_aix_gccgo.go
+new file mode 100644
+index 00000000000..2609cc49ae7
+--- /dev/null
++++ b/libgo/go/golang.org/x/sys/cpu/syscall_aix_gccgo.go
+@@ -0,0 +1 @@
++
+
+--
+2.27.0.rc0.183.gde8f92d652-goog
+=== 0001-Update-merge.sh-to-reflect.patch ===
+From b3d566f570f4416299240b51654b70c74f6cba6a Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Mon, 25 May 2020 20:55:29 +0200
+Subject: [PATCH] Update merge.sh to reflect usage of git.
+
+After switching to GIT, we should use it in libsanitizer
+merge script. I'll do merge from master as soon as
+PR95311 gets fixed.
+
+I'm going to install the patch.
+
+libsanitizer/ChangeLog:
+
+ * LOCAL_PATCHES: Use git hash instead of SVN id.
+ * merge.sh: Use git instead of VCS. Update paths
+ relative to upstream git repository.
+---
+ libsanitizer/LOCAL_PATCHES | 2 +-
+ libsanitizer/merge.sh | 10 ++++------
+ 2 files changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/libsanitizer/LOCAL_PATCHES b/libsanitizer/LOCAL_PATCHES
+index 292b7a6e489..7732de3d436 100644
+--- a/libsanitizer/LOCAL_PATCHES
++++ b/libsanitizer/LOCAL_PATCHES
+@@ -1 +1,2 @@
+
++
+diff --git a/libsanitizer/merge.sh b/libsanitizer/merge.sh
+index dfa7bf3d196..3f4f1629a22 100755
+--- a/libsanitizer/merge.sh
++++ b/libsanitizer/merge.sh
+@@ -1 +1,2 @@
+
++
+
+--
+2.26.2
+=== 0001-Ada-Reuse-Is_Package_Or_Generic_Package-where-possib.patch ===
+From 557b268fffffdeb0980a17411f458eee333f55c6 Mon Sep 17 00:00:00 2001
+From: Piotr Trojanek <trojanek@adacore.com>
+Date: Thu, 12 Dec 2019 11:45:24 +0100
+Subject: [PATCH] [Ada] Reuse Is_Package_Or_Generic_Package where possible
+
+2020-05-26 Piotr Trojanek <trojanek@adacore.com>
+
+gcc/ada/
+
+ * contracts.adb, einfo.adb, exp_ch9.adb, sem_ch12.adb,
+ sem_ch4.adb, sem_ch7.adb, sem_ch8.adb, sem_elab.adb,
+ sem_type.adb, sem_util.adb: Reuse Is_Package_Or_Generic_Package
+ where possible (similarly, reuse Is_Concurrent_Type if it was
+ possible in the same expressions).
+---
+ gcc/ada/contracts.adb | 2 +-
+ gcc/ada/einfo.adb | 22 +++++++++++-----------
+ gcc/ada/exp_ch9.adb | 2 +-
+ gcc/ada/sem_ch12.adb | 2 +-
+ gcc/ada/sem_ch4.adb | 2 +-
+ gcc/ada/sem_ch7.adb | 6 +++---
+ gcc/ada/sem_ch8.adb | 6 +++---
+ gcc/ada/sem_elab.adb | 2 +-
+ gcc/ada/sem_type.adb | 2 +-
+ gcc/ada/sem_util.adb | 6 +++---
+ 10 files changed, 26 insertions(+), 26 deletions(-)
+
+diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb
+index 981bb91..d58f136 100644
+--- a/gcc/ada/contracts.adb
++++ b/gcc/ada/contracts.adb
+@@ -0,0 +1 @@
++
+diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
+index 98b508f..1df8ed0 100644
+--- a/gcc/ada/einfo.adb
++++ b/gcc/ada/einfo.adb
+@@ -0,0 +1 @@
++
+diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
+index 64ac353..392a221 100644
+--- a/gcc/ada/exp_ch9.adb
++++ b/gcc/ada/exp_ch9.adb
+@@ -0,0 +1 @@
++
+diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
+index dc3a3c2..209e060 100644
+--- a/gcc/ada/sem_ch12.adb
++++ b/gcc/ada/sem_ch12.adb
+@@ -0,0 +1 @@
++
+diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
+index 5910112..702f265 100644
+--- a/gcc/ada/sem_ch4.adb
++++ b/gcc/ada/sem_ch4.adb
+@@ -0,0 +1 @@
++
+diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb
+index 6d9a1db..f217dfd 100644
+--- a/gcc/ada/sem_ch7.adb
++++ b/gcc/ada/sem_ch7.adb
+@@ -0,0 +1 @@
++
+diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
+index f083f7c..7f50b40 100644
+--- a/gcc/ada/sem_ch8.adb
++++ b/gcc/ada/sem_ch8.adb
+@@ -0,0 +1 @@
++
+diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb
+index f3cac46..dbf3fac 100644
+--- a/gcc/ada/sem_elab.adb
++++ b/gcc/ada/sem_elab.adb
+@@ -0,0 +1 @@
++
+diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb
+index e5d01dd..1868568 100644
+--- a/gcc/ada/sem_type.adb
++++ b/gcc/ada/sem_type.adb
+@@ -0,0 +1 @@
++
+diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
+index b980b4c..c1b1d9e 100644
+--- a/gcc/ada/sem_util.adb
++++ b/gcc/ada/sem_util.adb
+@@ -0,0 +1 @@
++
+--
+2.1.4
+
+=== 0001-Ada-Add-support-for-XDR-streaming-in-the-default-run.patch ===
+From ed248d9bc3b72b6888a1b9cd84a8ef26809249f0 Mon Sep 17 00:00:00 2001
+From: Arnaud Charlet <charlet@adacore.com>
+Date: Thu, 23 Apr 2020 05:46:29 -0400
+Subject: [PATCH] [Ada] Add support for XDR streaming in the default runtime
+
+--!# FROM: /homes/derodat/tron/gnat2fsf/gnat
+--!# COMMIT: 5ad4cabb9f70114eb61c025e91406d4fba253f95
+--!# Change-Id: I21f92cad27933747495cdfa544a048f62f944cbd
+--!# TN: T423-014
+
+Currently we provide a separate implementation of Stream_Attributes via
+s-stratt__xdr.adb which needs to be recompiled manually.
+
+This change introduces instead a new binder switch to choose at bind
+time which stream implementation to use and replaces s-stratt__xdr.adb
+by a new unit System.Stream_Attributes.XDR.
+
+2020-05-04 Arnaud Charlet <charlet@adacore.com>
+
+gcc/ada/
+
+ * Makefile.rtl: Add s-statxd.o.
+ * bindgen.adb (Gen_Adainit): Add support for XDR_Stream.
+ * bindusg.adb (Display): Add mention of -xdr.
+ * gnatbind.adb: Process -xdr switch.
+ * init.c (__gl_xdr_stream): New.
+ * opt.ads (XDR_Stream): New.
+ * libgnat/s-stratt__xdr.adb: Rename to...
+ * libgnat/s-statxd.adb: this and adjust.
+ * libgnat/s-statxd.ads: New.
+ * libgnat/s-stratt.ads, libgnat/s-stratt.adb: Choose between
+ default and XDR implementation at runtime.
+ * libgnat/s-ststop.ads: Update comments.
+ * doc/gnat_rm/implementation_advice.rst: Update doc on XDR
+ streaming.
+ * gnat_rm.texi: Regenerate.
+---
+ gcc/ada/Makefile.rtl | 1 +
+ gcc/ada/bindgen.adb | 29 +-
+ gcc/ada/bindusg.adb | 5 +
+ gcc/ada/doc/gnat_rm/implementation_advice.rst | 35 +--
+ gcc/ada/gnat_rm.texi | 36 +--
+ gcc/ada/gnatbind.adb | 5 +
+ gcc/ada/init.c | 1 +
+ .../{s-stratt__xdr.adb => s-statxd.adb} | 63 ++--
+ gcc/ada/libgnat/s-statxd.ads | 117 +++++++
+ gcc/ada/libgnat/s-stratt.adb | 286 +++++++++++++++---
+ gcc/ada/libgnat/s-stratt.ads | 7 +-
+ gcc/ada/libgnat/s-ststop.ads | 4 +-
+ gcc/ada/opt.ads | 6 +-
+ 13 files changed, 428 insertions(+), 167 deletions(-)
+ rename gcc/ada/libgnat/{s-stratt__xdr.adb => s-statxd.adb} (96%)
+ create mode 100644 gcc/ada/libgnat/s-statxd.ads
+
+diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
+index b340a9ef919..15e4f68ccdb 100644
+--- a/gcc/ada/Makefile.rtl
++++ b/gcc/ada/Makefile.rtl
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb
+index 99ad3009d13..91b4cb38486 100644
+--- a/gcc/ada/bindgen.adb
++++ b/gcc/ada/bindgen.adb
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/bindusg.adb b/gcc/ada/bindusg.adb
+index 45215d2ebea..6fd55ee8721 100644
+--- a/gcc/ada/bindusg.adb
++++ b/gcc/ada/bindusg.adb
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/doc/gnat_rm/implementation_advice.rst b/gcc/ada/doc/gnat_rm/implementation_advice.rst
+index 31376d92461..998d0c597df 100644
+--- a/gcc/ada/doc/gnat_rm/implementation_advice.rst
++++ b/gcc/ada/doc/gnat_rm/implementation_advice.rst
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
+index c174073d508..d72f905a2df 100644
+--- a/gcc/ada/gnat_rm.texi
++++ b/gcc/ada/gnat_rm.texi
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/gnatbind.adb b/gcc/ada/gnatbind.adb
+index 4907082a42c..4372152b439 100644
+--- a/gcc/ada/gnatbind.adb
++++ b/gcc/ada/gnatbind.adb
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/init.c b/gcc/ada/init.c
+index f9f627ebcff..e76aa79c5a8 100644
+--- a/gcc/ada/init.c
++++ b/gcc/ada/init.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/libgnat/s-stratt__xdr.adb b/gcc/ada/libgnat/s-statxd.adb
+similarity index 96%
+rename from gcc/ada/libgnat/s-stratt__xdr.adb
+rename to gcc/ada/libgnat/s-statxd.adb
+index 7e32fcf9b91..fcefae7e6f2 100644
+--- a/gcc/ada/libgnat/s-stratt__xdr.adb
++++ b/gcc/ada/libgnat/s-statxd.adb
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/libgnat/s-statxd.ads b/gcc/ada/libgnat/s-statxd.ads
+new file mode 100644
+index 00000000000..cca5e5471bd
+--- /dev/null
++++ b/gcc/ada/libgnat/s-statxd.ads
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/libgnat/s-stratt.adb b/gcc/ada/libgnat/s-stratt.adb
+index 64f3f040081..366dabdc7b6 100644
+--- a/gcc/ada/libgnat/s-stratt.adb
++++ b/gcc/ada/libgnat/s-stratt.adb
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/libgnat/s-stratt.ads b/gcc/ada/libgnat/s-stratt.ads
+index 73369490146..c8c453aad2a 100644
+--- a/gcc/ada/libgnat/s-stratt.ads
++++ b/gcc/ada/libgnat/s-stratt.ads
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/libgnat/s-ststop.ads b/gcc/ada/libgnat/s-ststop.ads
+index d0da0609d9d..321460b89d8 100644
+--- a/gcc/ada/libgnat/s-ststop.ads
++++ b/gcc/ada/libgnat/s-ststop.ads
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
+index 9e0263b431d..37f3d030e3f 100644
+--- a/gcc/ada/opt.ads
++++ b/gcc/ada/opt.ads
+@@ -1 +1,2 @@
+
++
+--
+2.20.1
+=== 0001-Fortran-type-is-real-kind-1.patch ===
+From 3ea6977d0f1813d982743a09660eec1760e981ec Mon Sep 17 00:00:00 2001
+From: Mark Eggleston <markeggleston@gcc.gnu.org>
+Date: Wed, 1 Apr 2020 09:52:41 +0100
+Subject: [PATCH] Fortran : "type is( real(kind(1.)) )" spurious syntax error
+ PR94397
+
+Based on a patch in the comments of the PR. That patch fixed this
+problem but caused the test cases for PR93484 to fail. It has been
+changed to reduce initialisation expressions if the expression is
+not EXPR_VARIABLE and not EXPR_CONSTANT.
+
+2020-05-28 Steven G. Kargl <kargl@gcc.gnu.org>
+ Mark Eggleston <markeggleston@gcc.gnu.org>
+
+gcc/fortran/
+
+ PR fortran/94397
+ * match.c (gfc_match_type_spec): New variable ok initialised
+ to true. Set ok with the return value of gfc_reduce_init_expr
+ called only if the expression is not EXPR_CONSTANT and is not
+ EXPR_VARIABLE. Add !ok to the check for type not being integer
+ or the rank being greater than zero.
+
+2020-05-28 Mark Eggleston <markeggleston@gcc.gnu.org>
+
+gcc/testsuite/
+
+ PR fortran/94397
+ * gfortran.dg/pr94397.F90: New test.
+---
+ gcc/fortran/match.c | 5 ++++-
+ gcc/testsuite/gfortran.dg/pr94397.F90 | 26 ++++++++++++++++++++++++++
+ 2 files changed, 30 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gfortran.dg/pr94397.F90
+
+diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
+index 8ae34a94a95..82d2b5087e5 100644
+--- a/gcc/fortran/match.c
++++ b/gcc/fortran/match.c
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/testsuite/gfortran.dg/pr94397.F90 b/gcc/testsuite/gfortran.dg/pr94397.F90
+new file mode 100644
+index 00000000000..fda10c1a88b
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/pr94397.F90
+@@ -0,0 +1 @@
++
+--
+2.26.2
+
+=== 0001-Missing-change-description.patch ===
+From 8ec655bd94615ba45adabae9b50df299edb74eda Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 29 May 2020 13:42:57 +0200
+Subject: [PATCH] Test me.
+
+gcc/ChangeLog:
+
+ * ipa-icf-gimple.c (compare_gimple_asm):
+ * ipa-icf-gimple2.c (compare_gimple_asm): Good.
+ * ipa-icf-gimple3.c (compare_gimple_asm):
+---
+ contrib/gcc-changelog/git_commit.py | 10 ++++++++++
+ gcc/ipa-icf-gimple.c | 1 +
+ 2 files changed, 11 insertions(+)
+
+diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c
+index 1cd5872c03d..6f95aedb3d3 100644
+--- a/gcc/ipa-icf-gimple.c
++++ b/gcc/ipa-icf-gimple.c
+@@ -850,3 +850,4 @@
+ }
+
+ } // ipa_icf_gimple namespace
++
+--
+2.26.2
+
+=== 0001-Fix-text-of-hyperlink-in-manual.patch ===
+From c7904d9e08a0ca3f733be3c2e8a3b912fa851fc5 Mon Sep 17 00:00:00 2001
+From: Jonathan Wakely <jwakely@redhat.com>
+Date: Fri, 8 Mar 2019 13:56:53 +0000
+Subject: [PATCH] Fix text of hyperlink in manual
+
+ * doc/xml/manual/using.xml: Use link element instead of xref.
+ * doc/html/*: Regenerate.
+
+---
+ libstdc++-v3/ChangeLog | 3 +++
+ libstdc++-v3/doc/html/manual/using_macros.html | 3 ++-
+ libstdc++-v3/doc/xml/manual/using.xml | 4 ++--
+ 3 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/libstdc++-v3/doc/html/manual/using_macros.html b/libstdc++-v3/doc/html/manual/using_macros.html
+index 7030bd2d0fd..dad6564a97d 100644
+--- a/libstdc++-v3/doc/html/manual/using_macros.html
++++ b/libstdc++-v3/doc/html/manual/using_macros.html
+@@ -1 +1,2 @@
+
++
+diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml
+index 2d44a739406..7647e9b8dad 100644
+--- a/libstdc++-v3/doc/xml/manual/using.xml
++++ b/libstdc++-v3/doc/xml/manual/using.xml
+@@ -1 +1,2 @@
+
++
+--
+2.25.4
+
+=== 0002-libstdc-Fake-test-change-1.patch ===
+From fe4ade6778d1d97214db12bf2c40d0f40e7f953a Mon Sep 17 00:00:00 2001
+From: Jonathan Wakely <jwakely@redhat.com>
+Date: Tue, 2 Jun 2020 11:52:34 +0100
+Subject: [PATCH] libstdc++: Fake change for testing git_commit.py
+
+libstdc++-v3/ChangeLog:
+
+ * doc/xml/faq.xml: Fake change.
+ * doc/html/*: Regenerated.
+---
+ libstdc++-v3/doc/xml/faq.xml | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libstdc++-v3/doc/xml/faq.xml b/libstdc++-v3/doc/xml/faq.xml
+index e419d3c22a0..bcc14dd6d90 100644
+--- a/libstdc++-v3/doc/xml/faq.xml
++++ b/libstdc++-v3/doc/xml/faq.xml
+@@ -1 +1,2 @@
+
++
+--
+2.25.4
+
+=== 0003-libstdc-Fake-test-change-2.patch ===
+From e460effb3a42c1c046b682fe266da418f2693ef3 Mon Sep 17 00:00:00 2001
+From: Jonathan Wakely <jwakely@redhat.com>
+Date: Tue, 2 Jun 2020 11:52:34 +0100
+Subject: [PATCH] libstdc++: Fake change for testing 2
+
+libstdc++-v3/ChangeLog:
+
+ * doc/xml/faq.xml: Fake change.
+---
+ libstdc++-v3/doc/html/faq.html | 2 +-
+ libstdc++-v3/doc/xml/faq.xml | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libstdc++-v3/doc/html/faq.html b/libstdc++-v3/doc/html/faq.html
+index 967e5f5f348..95d21b5bf9f 100644
+--- a/libstdc++-v3/doc/html/faq.html
++++ b/libstdc++-v3/doc/html/faq.html
+@@ -1 +1,2 @@
+
++
+--- a/libstdc++-v3/doc/xml/faq.xml
++++ b/libstdc++-v3/doc/xml/faq.xml
+@@ -1 +1,2 @@
+
++
+--
+2.25.4
+=== 0001-configure.patch ===
+From dbe341cf6a77bb28c5fdf8b32dcb0ff1c2a27348 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Tue, 9 Jun 2020 09:39:36 +0200
+Subject: [PATCH] c++: Fix --disable-bootstrap with older g++.
+
+Previously I had AX_CXX_COMPILE_STDCXX in the gcc directory configure, which
+added -std=c++11 to CXX if needed, but then CXX is overridden from the
+toplevel directory, so it didn't have the desired effect. Fixed by moving
+the check to the toplevel. Currently it is only used when building GCC
+without bootstrapping; other packages that share the toplevel directory
+can adjust the condition if they also want to require C++11 support.
+
+ChangeLog:
+
+ * configure.ac: Check AX_CXX_COMPILE_STDCXX if not bootstrapping.
+ * configure: Regenerate.
+
+gcc/ChangeLog:
+
+ * aclocal.m4: Remove ax_cxx_compile_stdcxx.m4.
+ * configure.ac: Remove AX_CXX_COMPILE_STDCXX.
+ * configure: Regenerate.
+
+---
+ configure | 999 ++++++++++++++++++++++++++++++++++++++++++++++-
+ configure.ac | 6 +-
+ gcc/aclocal.m4 | 1 -
+ gcc/configure | 997 +---------------------------------------------
+ gcc/configure.ac | 2 -
+ 5 files changed, 1004 insertions(+), 1001 deletions(-)
+
+diff --git a/configure b/configure
+index b7897446c70..a0c5aca9e8d 100755
+--- a/configure
++++ b/configure
+@@ -1 +1,2 @@
+
++
+diff --git a/configure.ac b/configure.ac
+index 59bd92a3e53..1a53ed418e4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4
+index e93c1535063..1737d59d1cb 100644
+--- a/gcc/aclocal.m4
++++ b/gcc/aclocal.m4
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/configure b/gcc/configure
+index 46850710424..629c7c7e153 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -1 +1,2 @@
+
++
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 60d83c30771..9e7efd13ecc 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1 +1,2 @@
+
++
+--
+2.26.2
+
+=== 0001-asan-fix-RTX-emission.patch ===
+From e1d68582022cfa2b1dc76646724b397ba2739439 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Thu, 11 Jun 2020 09:34:41 +0200
+Subject: [PATCH] asan: fix RTX emission for ilp32
+
+gcc/ChangeLog:
+
+ PR sanitizer/95634
+ * asan.c (asan_emit_stack_protection): Fix emission for ilp32
+ by using Pmode instead of ptr_mode.
+
+Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
+(cherry picked from commit 8cff672cb9a132d3d3158c2edfc9a64b55292b80)
+---
+ gcc/asan.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/asan.c b/gcc/asan.c
+index 823eb539993..4ec22162c12 100644
+--- a/gcc/asan.c
++++ b/gcc/asan.c
+@@ -1 +1,2 @@
+
++
+--
+2.27.0
+
+=== 0001-Check-for-more-missing-math-decls-on-vxworks.patch ===
+From 0edfc1fd22405ee8e946101e44cd8edc0ee12047 Mon Sep 17 00:00:00 2001
+From: Douglas B Rupp <douglas.b.rupp@gmail.com>
+Date: Sun, 31 May 2020 13:25:28 -0700
+Subject: [PATCH] Check for more missing math decls on vxworks.
+
+Use the GLIBCXX_CHECK_MATH_DECL macro to check for the full list of
+vxworks math decls.
+
+for libstdc++-v3/ChangeLog:
+
+ * crossconfig.m4 <*-vxworks>: Check for more math decls.
+ * configure [FAKEPATCH]: Rebuild.
+---
+ libstdc++-v3/configure | 255 ++++++++++++++++++++++++++++++++++++++++++++
+ libstdc++-v3/crossconfig.m4 | 3 +-
+ 2 files changed, 257 insertions(+), 1 deletion(-)
+
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index b5beb45..4ef678e 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -1 +1,2 @@
+
++
+diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
+index fe18288..313f84d 100644
+--- a/libstdc++-v3/crossconfig.m4
++++ b/libstdc++-v3/crossconfig.m4
+@@ -1 +1,2 @@
+
++
+--
+2.7.4
+
diff --git a/contrib/gcc-git-customization.sh b/contrib/gcc-git-customization.sh
index a932bf8..200b81e 100755
--- a/contrib/gcc-git-customization.sh
+++ b/contrib/gcc-git-customization.sh
@@ -25,6 +25,11 @@ git config alias.svn-rev '!f() { rev=$1; shift; git log --all --grep="^From-SVN:
git config alias.gcc-descr \!"f() { if test \${1:-no} = --full; then c=\${2:-master}; r=\$(git describe --all --abbrev=40 --match 'basepoints/gcc-[0-9]*' \$c | sed -n 's,^\\(tags/\\)\\?basepoints/gcc-,r,p'); expr match \${r:-no} '^r[0-9]\\+\$' >/dev/null && r=\${r}-0-g\$(git rev-parse \${2:-master}); else c=\${1:-master}; r=\$(git describe --all --match 'basepoints/gcc-[0-9]*' \$c | sed -n 's,^\\(tags/\\)\\?basepoints/gcc-\\([0-9]\\+\\)-\\([0-9]\\+\\)-g[0-9a-f]*\$,r\\2-\\3,p;s,^\\(tags/\\)\\?basepoints/gcc-\\([0-9]\\+\\)\$,r\\2-0,p'); fi; if test -n \$r; then o=\$(git config --get gcc-config.upstream); rr=\$(echo \$r | sed -n 's,^r\\([0-9]\\+\\)-[0-9]\\+\\(-g[0-9a-f]\\+\\)\\?\$,\\1,p'); if git rev-parse --verify --quiet \${o:-origin}/releases/gcc-\$rr >/dev/null; then m=releases/gcc-\$rr; else m=master; fi; git merge-base --is-ancestor \$c \${o:-origin}/\$m && \echo \${r}; fi; }; f"
git config alias.gcc-undescr \!"f() { o=\$(git config --get gcc-config.upstream); r=\$(echo \$1 | sed -n 's,^r\\([0-9]\\+\\)-[0-9]\\+\$,\\1,p'); n=\$(echo \$1 | sed -n 's,^r[0-9]\\+-\\([0-9]\\+\\)\$,\\1,p'); test -z \$r && echo Invalid id \$1 && exit 1; h=\$(git rev-parse --verify --quiet \${o:-origin}/releases/gcc-\$r); test -z \$h && h=\$(git rev-parse --verify --quiet \${o:-origin}/master); p=\$(git describe --all --match 'basepoints/gcc-'\$r \$h | sed -n 's,^\\(tags/\\)\\?basepoints/gcc-[0-9]\\+-\\([0-9]\\+\\)-g[0-9a-f]*\$,\\2,p;s,^\\(tags/\\)\\?basepoints/gcc-[0-9]\\+\$,0,p'); git rev-parse --verify \$h~\$(expr \$p - \$n); }; f"
+git config alias.gcc-verify '!f() { "`git rev-parse --show-toplevel`/contrib/gcc-changelog/git_check_commit.py" $@; } ; f'
+git config alias.gcc-backport '!f() { "`git rev-parse --show-toplevel`/contrib/git-backport.py" $@; } ; f'
+git config alias.gcc-mklog '!f() { "`git rev-parse --show-toplevel`/contrib/mklog.py" $@; } ; f'
+git config alias.gcc-commit-mklog '!f() { GCC_FORCE_MKLOG=1 git commit "$@"; }; f'
+
# Make diff on MD files use "(define" as a function marker.
# Use this in conjunction with a .gitattributes file containing
# *.md diff=md
@@ -122,6 +127,17 @@ echo "(local branches starting <prefix>/ can be pushed directly to your"
ask "personal area on the gcc server)" $old_pfx new_pfx
git config "gcc-config.userpfx" "$new_pfx"
+echo
+ask "Install prepare-commit-msg git hook for 'git commit-mklog' alias" yes dohook
+if [ "x$dohook" = xyes ]; then
+ hookdir=`git rev-parse --git-path hooks`
+ if [ -f "$hookdir/prepare-commit-msg" ]; then
+ echo " Moving existing prepare-commit-msg hook to prepare-commit-msg.bak"
+ mv "$hookdir/prepare-commit-msg" "$hookdir/prepare-commit-msg.bak"
+ fi
+ install -c "`git rev-parse --show-toplevel`/contrib/prepare-commit-msg" "$hookdir"
+fi
+
# Scan the existing settings to see if there are any we need to rewrite.
vendors=$(git config --get-all "remote.${upstream}.fetch" "refs/vendors/" | sed -r "s:.*refs/vendors/([^/]+)/.*:\1:" | sort | uniq)
url=$(git config --get "remote.${upstream}.url")
diff --git a/contrib/gcc_update b/contrib/gcc_update
index 8c980b1..5e8af0e 100755
--- a/contrib/gcc_update
+++ b/contrib/gcc_update
@@ -72,6 +72,7 @@ fixincludes/configure: fixincludes/configure.ac fixincludes/aclocal.m4
fixincludes/config.h.in: fixincludes/configure.ac fixincludes/aclocal.m4
# intl library
intl/plural.c: intl/plural.y
+intl/plural-config.h: intl/plural.y
intl/configure: intl/configure.ac intl/aclocal.m4
intl/config.h.in: intl/configure.ac intl/aclocal.m4
# Now, proceed to gcc automatically generated files
diff --git a/contrib/git-backport.py b/contrib/git-backport.py
new file mode 100755
index 0000000..3a9413d
--- /dev/null
+++ b/contrib/git-backport.py
@@ -0,0 +1,65 @@
+#!/usr/bin/env python3
+
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING. If not, write to
+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+import argparse
+import subprocess
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser(description='Backport a git revision and '
+ 'stash all ChangeLog files.')
+ parser.add_argument('revision', help='Revision')
+ args = parser.parse_args()
+
+ r = subprocess.run('git cherry-pick -x %s' % args.revision, shell=True)
+ if r.returncode == 0:
+ cmd = 'git show --name-only --pretty="" -- "*ChangeLog"'
+ changelogs = subprocess.check_output(cmd, shell=True, encoding='utf8')
+ changelogs = changelogs.strip()
+ if changelogs:
+ for changelog in changelogs.split('\n'):
+ subprocess.check_output('git checkout HEAD~ %s' % changelog,
+ shell=True)
+ subprocess.check_output('git commit --amend --no-edit', shell=True)
+ else:
+ # 1) remove all ChangeLog files from conflicts
+ out = subprocess.check_output('git diff --name-only --diff-filter=U',
+ shell=True,
+ encoding='utf8')
+ conflicts = out.strip().split('\n')
+ changelogs = [c for c in conflicts if c.endswith('ChangeLog')]
+ if changelogs:
+ cmd = 'git checkout --theirs %s' % '\n'.join(changelogs)
+ subprocess.check_output(cmd, shell=True)
+ # 2) remove all ChangeLog files from index
+ cmd = 'git diff --name-only --diff-filter=M HEAD'
+ out = subprocess.check_output(cmd, shell=True, encoding='utf8')
+ out = out.strip().split('\n')
+ modified = [c for c in out if c.endswith('ChangeLog')]
+ for m in modified:
+ subprocess.check_output('git reset %s' % m, shell=True)
+ subprocess.check_output('git checkout %s' % m, shell=True)
+
+ # try to continue
+ if len(conflicts) == len(changelogs):
+ cmd = 'git -c core.editor=true cherry-pick --continue'
+ subprocess.check_output(cmd, shell=True)
+ else:
+ print('Please resolve all remaining file conflicts.')
diff --git a/contrib/mklog b/contrib/legacy/mklog
index 71fd427..71fd427 100755
--- a/contrib/mklog
+++ b/contrib/legacy/mklog
diff --git a/contrib/mklog.pl b/contrib/legacy/mklog.pl
index ff20cf1..ff20cf1 100755
--- a/contrib/mklog.pl
+++ b/contrib/legacy/mklog.pl
diff --git a/contrib/mklog.py b/contrib/mklog.py
new file mode 100755
index 0000000..243edbb
--- /dev/null
+++ b/contrib/mklog.py
@@ -0,0 +1,261 @@
+#!/usr/bin/env python3
+
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING. If not, write to
+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# This script parses a .diff file generated with 'diff -up' or 'diff -cp'
+# and adds a skeleton ChangeLog file to the file. It does not try to be
+# too smart when parsing function names, but it produces a reasonable
+# approximation.
+#
+# Author: Martin Liska <mliska@suse.cz>
+
+import argparse
+import os
+import re
+import sys
+from itertools import takewhile
+
+import requests
+
+from unidiff import PatchSet
+
+pr_regex = re.compile(r'(\/(\/|\*)|[Cc*!])\s+(?P<pr>PR [a-z+-]+\/[0-9]+)')
+dr_regex = re.compile(r'(\/(\/|\*)|[Cc*!])\s+(?P<dr>DR [0-9]+)')
+identifier_regex = re.compile(r'^([a-zA-Z0-9_#].*)')
+comment_regex = re.compile(r'^\/\*')
+struct_regex = re.compile(r'^(class|struct|union|enum)\s+'
+ r'(GTY\(.*\)\s+)?([a-zA-Z0-9_]+)')
+macro_regex = re.compile(r'#\s*(define|undef)\s+([a-zA-Z0-9_]+)')
+super_macro_regex = re.compile(r'^DEF[A-Z0-9_]+\s*\(([a-zA-Z0-9_]+)')
+fn_regex = re.compile(r'([a-zA-Z_][^()\s]*)\s*\([^*]')
+template_and_param_regex = re.compile(r'<[^<>]*>')
+bugzilla_url = 'https://gcc.gnu.org/bugzilla/rest.cgi/bug?id=%s&' \
+ 'include_fields=summary'
+
+function_extensions = set(['.c', '.cpp', '.C', '.cc', '.h', '.inc', '.def'])
+
+help_message = """\
+Generate ChangeLog template for PATCH.
+PATCH must be generated using diff(1)'s -up or -cp options
+(or their equivalent in git).
+"""
+
+script_folder = os.path.realpath(__file__)
+gcc_root = os.path.dirname(os.path.dirname(script_folder))
+
+
+def find_changelog(path):
+ folder = os.path.split(path)[0]
+ while True:
+ if os.path.exists(os.path.join(gcc_root, folder, 'ChangeLog')):
+ return folder
+ folder = os.path.dirname(folder)
+ if folder == '':
+ return folder
+ raise AssertionError()
+
+
+def extract_function_name(line):
+ if comment_regex.match(line):
+ return None
+ m = struct_regex.search(line)
+ if m:
+ # Struct declaration
+ return m.group(1) + ' ' + m.group(3)
+ m = macro_regex.search(line)
+ if m:
+ # Macro definition
+ return m.group(2)
+ m = super_macro_regex.search(line)
+ if m:
+ # Supermacro
+ return m.group(1)
+ m = fn_regex.search(line)
+ if m:
+ # Discard template and function parameters.
+ fn = m.group(1)
+ fn = re.sub(template_and_param_regex, '', fn)
+ return fn.rstrip()
+ return None
+
+
+def try_add_function(functions, line):
+ fn = extract_function_name(line)
+ if fn and fn not in functions:
+ functions.append(fn)
+ return bool(fn)
+
+
+def sort_changelog_files(changed_file):
+ return (changed_file.is_added_file, changed_file.is_removed_file)
+
+
+def get_pr_titles(prs):
+ output = ''
+ for pr in prs:
+ id = pr.split('/')[-1]
+ r = requests.get(bugzilla_url % id)
+ bugs = r.json()['bugs']
+ if len(bugs) == 1:
+ output += '%s - %s\n' % (pr, bugs[0]['summary'])
+ print(output)
+ if output:
+ output += '\n'
+ return output
+
+
+def generate_changelog(data, no_functions=False, fill_pr_titles=False):
+ changelogs = {}
+ changelog_list = []
+ prs = []
+ out = ''
+ diff = PatchSet(data)
+
+ for file in diff:
+ changelog = find_changelog(file.path)
+ if changelog not in changelogs:
+ changelogs[changelog] = []
+ changelog_list.append(changelog)
+ changelogs[changelog].append(file)
+
+ # Extract PR entries from newly added tests
+ if 'testsuite' in file.path and file.is_added_file:
+ for line in list(file)[0]:
+ m = pr_regex.search(line.value)
+ if m:
+ pr = m.group('pr')
+ if pr not in prs:
+ prs.append(pr)
+ else:
+ m = dr_regex.search(line.value)
+ if m:
+ dr = m.group('dr')
+ if dr not in prs:
+ prs.append(dr)
+ else:
+ break
+
+ if fill_pr_titles:
+ out += get_pr_titles(prs)
+
+ # sort ChangeLog so that 'testsuite' is at the end
+ for changelog in sorted(changelog_list, key=lambda x: 'testsuite' in x):
+ files = changelogs[changelog]
+ out += '%s:\n' % os.path.join(changelog, 'ChangeLog')
+ out += '\n'
+ for pr in prs:
+ out += '\t%s\n' % pr
+ # new and deleted files should be at the end
+ for file in sorted(files, key=sort_changelog_files):
+ assert file.path.startswith(changelog)
+ in_tests = 'testsuite' in changelog or 'testsuite' in file.path
+ relative_path = file.path[len(changelog):].lstrip('/')
+ functions = []
+ if file.is_added_file:
+ msg = 'New test' if in_tests else 'New file'
+ out += '\t* %s: %s.\n' % (relative_path, msg)
+ elif file.is_removed_file:
+ out += '\t* %s: Removed.\n' % (relative_path)
+ elif hasattr(file, 'is_rename') and file.is_rename:
+ out += '\t* %s: Moved to...\n' % (relative_path)
+ new_path = file.target_file[2:]
+ # A file can be theoretically moved to a location that
+ # belongs to a different ChangeLog. Let user fix it.
+ if new_path.startswith(changelog):
+ new_path = new_path[len(changelog):].lstrip('/')
+ out += '\t* %s: ...here.\n' % (new_path)
+ else:
+ if not no_functions:
+ for hunk in file:
+ # Do not add function names for testsuite files
+ extension = os.path.splitext(relative_path)[1]
+ if not in_tests and extension in function_extensions:
+ last_fn = None
+ modified_visited = False
+ success = False
+ for line in hunk:
+ m = identifier_regex.match(line.value)
+ if line.is_added or line.is_removed:
+ if not line.value.strip():
+ continue
+ modified_visited = True
+ if m and try_add_function(functions,
+ m.group(1)):
+ last_fn = None
+ success = True
+ elif line.is_context:
+ if last_fn and modified_visited:
+ try_add_function(functions, last_fn)
+ last_fn = None
+ modified_visited = False
+ success = True
+ elif m:
+ last_fn = m.group(1)
+ modified_visited = False
+ if not success:
+ try_add_function(functions,
+ hunk.section_header)
+ if functions:
+ out += '\t* %s (%s):\n' % (relative_path, functions[0])
+ for fn in functions[1:]:
+ out += '\t(%s):\n' % fn
+ else:
+ out += '\t* %s:\n' % relative_path
+ out += '\n'
+ return out
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser(description=help_message)
+ parser.add_argument('input', nargs='?',
+ help='Patch file (or missing, read standard input)')
+ parser.add_argument('-s', '--no-functions', action='store_true',
+ help='Do not generate function names in ChangeLogs')
+ parser.add_argument('-p', '--fill-up-bug-titles', action='store_true',
+ help='Download title of mentioned PRs')
+ parser.add_argument('-c', '--changelog',
+ help='Append the ChangeLog to a git commit message '
+ 'file')
+ args = parser.parse_args()
+ if args.input == '-':
+ args.input = None
+
+ input = open(args.input) if args.input else sys.stdin
+ data = input.read()
+ output = generate_changelog(data, args.no_functions,
+ args.fill_up_bug_titles)
+ if args.changelog:
+ lines = open(args.changelog).read().split('\n')
+ start = list(takewhile(lambda l: not l.startswith('#'), lines))
+ end = lines[len(start):]
+ with open(args.changelog, 'w') as f:
+ if start:
+ # appent empty line
+ if start[-1] != '':
+ start.append('')
+ else:
+ # append 2 empty lines
+ start = 2 * ['']
+ f.write('\n'.join(start))
+ f.write('\n')
+ f.write(output)
+ f.write('\n'.join(end))
+ else:
+ print(output, end='')
diff --git a/contrib/prepare-commit-msg b/contrib/prepare-commit-msg
new file mode 100755
index 0000000..969847d
--- /dev/null
+++ b/contrib/prepare-commit-msg
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING. If not, write to
+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+COMMIT_MSG_FILE=$1
+COMMIT_SOURCE=$2
+SHA1=$3
+
+# We might be on a branch before the file was added.
+if ! [ -x contrib/mklog.py ]; then exit 0; fi
+
+# Can't do anything if $COMMIT_MSG_FILE isn't a file.
+if ! [ -f "$COMMIT_MSG_FILE" ]; then exit 0; fi
+
+# Don't do anything unless requested to.
+if [ -z "$GCC_FORCE_MKLOG" ]; then exit 0; fi
+
+if [ -z "$COMMIT_SOURCE" ] || [ $COMMIT_SOURCE = template ]; then
+ # No source or "template" means new commit.
+ cmd="diff --cached"
+
+elif [ $COMMIT_SOURCE = message ]; then
+ # "message" means -m; assume a new commit if there are any changes staged.
+ if ! git diff --cached --quiet; then
+ cmd="diff --cached"
+ else
+ cmd="diff --cached HEAD^"
+ fi
+
+elif [ $COMMIT_SOURCE = commit ]; then
+ # The message of an existing commit. If it's HEAD, assume --amend;
+ # otherwise, assume a new commit with -C.
+ if [ $SHA1 = HEAD ]; then
+ cmd="diff --cached HEAD^"
+ if [ "$(git config gcc-config.mklog-hook-type)" = "smart-amend" ]; then
+ # Check if the existing message still describes the staged changes.
+ f=$(mktemp /tmp/git-commit.XXXXXX) || exit 1
+ git log -1 --pretty=email HEAD > $f
+ printf '\n---\n\n' >> $f
+ git $cmd >> $f
+ if contrib/gcc-changelog/git_email.py "$f" >/dev/null 2>&1; then
+ # Existing commit message is still OK for amended commit.
+ rm $f
+ exit 0
+ fi
+ rm $f
+ fi
+ else
+ cmd="diff --cached"
+ fi
+else
+ # Do nothing for merge or squash.
+ exit 0
+fi
+
+# Save diff to a file if requested.
+DIFF_FILE=$(git config gcc-config.diff-file)
+if ! [ -z "$DIFF_FILE" ]; then
+ tee="tee $DIFF_FILE"
+else
+ tee="cat"
+fi
+
+git $cmd | $tee | git gcc-mklog -c "$COMMIT_MSG_FILE"
diff --git a/contrib/test_mklog.py b/contrib/test_mklog.py
new file mode 100755
index 0000000..344b7a2
--- /dev/null
+++ b/contrib/test_mklog.py
@@ -0,0 +1,439 @@
+#!/usr/bin/env python3
+
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING. If not, write to
+# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# This script parses a .diff file generated with 'diff -up' or 'diff -cp'
+# and adds a skeleton ChangeLog file to the file. It does not try to be
+# too smart when parsing function names, but it produces a reasonable
+# approximation.
+#
+# Author: Martin Liska <mliska@suse.cz>
+
+import unittest
+
+from mklog import generate_changelog
+
+import unidiff
+
+unidiff_supports_renaming = hasattr(unidiff.PatchedFile(), 'is_rename')
+
+
+PATCH1 = '''\
+diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h
+index 567c23380fe..e6209ede9d6 100644
+--- a/gcc/config/riscv/riscv.h
++++ b/gcc/config/riscv/riscv.h
+@@ -920,6 +920,7 @@ extern unsigned riscv_stack_boundary;
+ #define SHIFT_RS1 15
+ #define SHIFT_IMM 20
+ #define IMM_BITS 12
++#define C_S_BITS 5
+ #define C_SxSP_BITS 6
+
+ #define IMM_REACH (1LL << IMM_BITS)
+@@ -929,6 +930,10 @@ extern unsigned riscv_stack_boundary;
+ #define SWSP_REACH (4LL << C_SxSP_BITS)
+ #define SDSP_REACH (8LL << C_SxSP_BITS)
+
++/* This is the maximum value that can be represented in a compressed load/store
++ offset (an unsigned 5-bit value scaled by 4). */
++#define CSW_MAX_OFFSET ((4LL << C_S_BITS) - 1) & ~3
++
+ /* Called from RISCV_REORG, this is defined in riscv-sr.c. */
+
+ extern void riscv_remove_unneeded_save_restore_calls (void);
+
+'''
+
+EXPECTED1 = '''\
+gcc/ChangeLog:
+
+ * config/riscv/riscv.h (C_S_BITS):
+ (CSW_MAX_OFFSET):
+
+'''
+
+PATCH2 = '''\
+diff --git a/gcc/targhooks.h b/gcc/targhooks.h
+index 9704d23f1db..b572a36e8cf 100644
+--- a/gcc/targhooks.h
++++ b/gcc/targhooks.h
+@@ -120,7 +120,7 @@ extern bool default_empty_mask_is_expensive (unsigned);
+ extern void *default_init_cost (class loop *);
+ extern unsigned default_add_stmt_cost (class vec_info *, void *, int,
+ enum vect_cost_for_stmt,
+- class _stmt_vec_info *, int,
++ class _stmt_vec_info *, tree, int,
+ enum vect_cost_model_location);
+ extern void default_finish_cost (void *, unsigned *, unsigned *, unsigned *);
+ extern void default_destroy_cost_data (void *);
+@@ -186,6 +186,7 @@ extern tree default_emutls_var_init (tree, tree, tree);
+ extern unsigned int default_hard_regno_nregs (unsigned int, machine_mode);
+ extern bool default_hard_regno_scratch_ok (unsigned int);
+ extern bool default_mode_dependent_address_p (const_rtx, addr_space_t);
++extern bool default_new_address_profitable_p (rtx, rtx_insn *, rtx);
+ extern bool default_target_option_valid_attribute_p (tree, tree, tree, int);
+ extern bool default_target_option_pragma_parse (tree, tree);
+ extern bool default_target_can_inline_p (tree, tree);
+
+'''
+
+EXPECTED2 = '''\
+gcc/ChangeLog:
+
+ * targhooks.h (default_add_stmt_cost):
+ (default_new_address_profitable_p):
+
+'''
+
+PATCH3 = '''\
+diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
+index 2b1e33f94ae..7f47402f9b9 100644
+--- a/libcpp/include/cpplib.h
++++ b/libcpp/include/cpplib.h
+@@ -173,7 +173,7 @@ enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_GNUC11, CLK_GNUC17, CLK_GNUC2X,
+ CLK_STDC2X,
+ CLK_GNUCXX, CLK_CXX98, CLK_GNUCXX11, CLK_CXX11,
+ CLK_GNUCXX14, CLK_CXX14, CLK_GNUCXX17, CLK_CXX17,
+- CLK_GNUCXX2A, CLK_CXX2A, CLK_ASM};
++ CLK_GNUCXX20, CLK_CXX20, CLK_ASM};
+
+ /* Payload of a NUMBER, STRING, CHAR or COMMENT token. */
+ struct GTY(()) cpp_string {
+@@ -484,7 +484,7 @@ struct cpp_options
+ /* Nonzero for C2X decimal floating-point constants. */
+ unsigned char dfp_constants;
+
+- /* Nonzero for C++2a __VA_OPT__ feature. */
++ /* Nonzero for C++20 __VA_OPT__ feature. */
+ unsigned char va_opt;
+
+ /* Nonzero for the '::' token. */
+
+'''
+
+EXPECTED3 = '''\
+libcpp/ChangeLog:
+
+ * include/cpplib.h (enum c_lang):
+ (struct cpp_options):
+
+'''
+
+EXPECTED3B = '''\
+libcpp/ChangeLog:
+
+ * include/cpplib.h:
+
+'''
+
+PATCH4 = '''\
+diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
+index aab79492357..f0df1002488 100644
+--- a/gcc/ipa-icf.c
++++ b/gcc/ipa-icf.c
+@@ -1,5 +1,7 @@
+
+
++
++
+ /* Interprocedural Identical Code Folding pass
+ Copyright (C) 2014-2020 Free Software Foundation, Inc.
+
+diff --git a/gcc/testsuite/gcc.dg/pr32374.c b/gcc/testsuite/gcc.dg/pr32374.c
+deleted file mode 100644
+index de15d559f5b..00000000000
+--- a/gcc/testsuite/gcc.dg/pr32374.c
++++ /dev/null
+@@ -1,20 +0,0 @@
+-/* { dg-do compile } */
+-/* { dg-options "-O2" } */
+-
+-extern int *stderr;
+-
+-void f (int *, const char *, ...);
+-
+-void g (const char *conf_name)
+-{
+- typedef struct
+- {
+- const char *label;
+- const int value;
+- } Section;
+-
+- const Section sections[2] = { {"", 0}, {"", 1} };
+-
+- f (stderr, "", "", conf_name, 0, sections[0]);
+- f (stderr, "", "", conf_name, 0, sections[0]);
+-}
+diff --git a/gcc/testsuite/gcc.dg/pr40209.c b/gcc/testsuite/gcc.dg/pr40209.c
+index 4e77df5c2e6..c23d69d1f1b 100644
+--- a/gcc/testsuite/gcc.dg/pr40209.c
++++ b/gcc/testsuite/gcc.dg/pr40209.c
+@@ -1,6 +1,8 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O2 -fprofile-use -fopt-info -Wno-missing-profile" } */
+
++
++
+ void process(const char *s);
+
+ struct BaseHolder {
+diff --git a/gcc/testsuite/gcc.dg/pr50209.c b/gcc/testsuite/gcc.dg/pr50209.c
+new file mode 100644
+index 00000000000..b28b04f6431
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr50209.c
+@@ -0,0 +1,3 @@
++
++
++
+diff --git a/gcc/testsuite/gcc.dg/pr63567-1.c b/gcc/testsuite/gcc.dg/pr63567-1.c
+index 97da171563e..00c5ecc11fa 100644
+--- a/gcc/testsuite/gcc.dg/pr63567-1.c
++++ b/gcc/testsuite/gcc.dg/pr63567-1.c
+@@ -1,3 +1,4 @@
++
+ /* PR c/63567 */
+ /* { dg-do compile } */
+ /* { dg-options "" } */
+diff --git a/gcc/varasm.c b/gcc/varasm.c
+index f062e48071f..fd3c7ca8cf3 100644
+--- a/gcc/varasm.c
++++ b/gcc/varasm.c
+@@ -1,3 +1,5 @@
++
++
+ /* Output variables, constants and external declarations, for GNU compiler.
+ Copyright (C) 1987-2020 Free Software Foundation, Inc.
+
+diff --git a/libssp/gets-chk.c b/libssp/gets-chk.c
+index 4ad78c1f77b..6687b368038 100644
+--- a/libssp/gets-chk.c
++++ b/libssp/gets-chk.c
+@@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+
++
++
+ #include "config.h"
+ #include <ssp/ssp.h>
+ #include <stdarg.h>
+'''
+
+EXPECTED4 = '''\
+gcc/ChangeLog:
+
+ * ipa-icf.c:
+ * varasm.c:
+
+libssp/ChangeLog:
+
+ * gets-chk.c:
+
+gcc/testsuite/ChangeLog:
+
+ * gcc.dg/pr40209.c:
+ * gcc.dg/pr63567-1.c:
+ * gcc.dg/pr32374.c: Removed.
+ * gcc.dg/pr50209.c: New test.
+
+'''
+
+PATCH5 = '''\
+diff --git a/gcc/testsuite/gcc.target/i386/pr95046-6.c b/gcc/testsuite/gcc.target/i386/pr95046-6.c
+new file mode 100644
+index 00000000000..dcc8999c446
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/i386/pr95046-6.c
+@@ -0,0 +1,44 @@
++/* PR target/95046 */
++/* { dg-do compile { target { ! ia32 } } } */
++/* { dg-options "-O3 -mavx512vl" } */
++
++
++double r[2];
++int s[2];
++unsigned int u[2];
++
++void
++test_float (void)
++{
++ for (int i = 0; i < 2; i++)
++ r[i] = s[i];
++}
++
++/* { dg-final { scan-assembler "\tvcvtdq2pd" } } */
++
++void
++test_ufloat (void)
++{
++ for (int i = 0; i < 2; i++)
++ r[i] = u[i];
++}
++
++/* { dg-final { scan-assembler "\tvcvtudq2pd" } } */
++
++void
++test_fix (void)
++{
++ for (int i = 0; i < 2; i++)
++ s[i] = r[i];
++}
++
++/* { dg-final { scan-assembler "\tvcvttpd2dqx" } } */
++
++void
++test_ufix (void)
++{
++ for (int i = 0; i < 2; i++)
++ u[i] = r[i];
++}
++
++/* { dg-final { scan-assembler "\tvcvttpd2udqx" } } */
+--
+2.26.2
+
+'''
+
+EXPECTED5 = '''\
+PR target/95046 - Vectorize V2SFmode operations
+
+gcc/testsuite/ChangeLog:
+
+ PR target/95046
+ * gcc.target/i386/pr95046-6.c: New test.
+
+'''
+
+PATCH6 = '''\
+diff --git a/gcc/cgraph.h b/gcc/cgraph.h
+index 5ddeb65269b..cfae6e91da9 100644
+--- a/gcc/cgraph.h
++++ b/gcc/cgraph.h
+@@ -937,7 +937,8 @@ struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node
+ split_part (false), indirect_call_target (false), local (false),
+ versionable (false), can_change_signature (false),
+ redefined_extern_inline (false), tm_may_enter_irr (false),
+- ipcp_clone (false), m_uid (uid), m_summary_id (-1)
++ ipcp_clone (false), declare_variant_alt (false),
++ calls_declare_variant_alt (false), m_uid (uid), m_summary_id (-1)
+ {}
+
+ /* Remove the node from cgraph and all inline clones inlined into it.
+
+'''
+
+EXPECTED6 = '''\
+gcc/ChangeLog:
+
+ * cgraph.h (struct cgraph_node):
+
+'''
+
+PATCH7 = '''\
+diff --git a/gcc/testsuite/g++.dg/DRs/dr2237.C b/gcc/testsuite/g++.dg/DRs/dr2237.C
+new file mode 100644
+index 00000000000..f3d6d11e61e
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/DRs/dr2237.C
+@@ -0,0 +1,18 @@
++// DR 2237 - Can a template-id name a constructor?
++
++template<class T>
++struct X {
++ X<T>(); // { dg-error "expected" "" { target c++20 } }
++ X(int); // OK, injected-class-name used
++ ~X<T>(); // { dg-error "template-id not allowed for destructor" "" { target c++20 } }
++};
++
++// ill-formed since DR1435
++template<typename T> X<T>::X<T>() {} // { dg-error "names the constructor|as no template constructors" }
++template<typename T> X<T>::~X<T>() {} // { dg-error "template-id not allowed for destructor" "" { target c++20 } }
++
++struct Q {
++ // ill-formed since DR1435
++ template<typename T> friend X<T>::X<T>(); // { dg-error "names the constructor|as no template constructors" }
++ template<typename T> friend X<T>::~X<T>(); // { dg-error "template-id not allowed for destructor" "" { target c++20 } }
++};
+'''
+
+EXPECTED7 = '''\
+gcc/testsuite/ChangeLog:
+
+ DR 2237
+ * g++.dg/DRs/dr2237.C: New test.
+
+'''
+
+PATCH8 = '''\
+diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf2.c
+similarity index 100%
+rename from gcc/ipa-icf.c
+rename to gcc/ipa-icf2.c
+'''
+
+EXPECTED8 = '''\
+gcc/ChangeLog:
+
+ * ipa-icf.c: Moved to...
+ * ipa-icf2.c: ...here.
+
+'''
+
+class TestMklog(unittest.TestCase):
+ def test_macro_definition(self):
+ changelog = generate_changelog(PATCH1)
+ assert changelog == EXPECTED1
+
+ def test_changed_argument(self):
+ changelog = generate_changelog(PATCH2)
+ assert changelog == EXPECTED2
+
+ def test_enum_and_struct(self):
+ changelog = generate_changelog(PATCH3)
+ assert changelog == EXPECTED3
+
+ def test_no_function(self):
+ changelog = generate_changelog(PATCH3, True)
+ assert changelog == EXPECTED3B
+
+ def test_sorting(self):
+ changelog = generate_changelog(PATCH4)
+ assert changelog == EXPECTED4
+
+ def test_pr_bugzilla_download(self):
+ changelog = generate_changelog(PATCH5, fill_pr_titles=True)
+ assert changelog == EXPECTED5
+
+ def test_gty_in_struct(self):
+ changelog = generate_changelog(PATCH6, fill_pr_titles=True)
+ assert changelog == EXPECTED6
+
+ def test_dr_detection_in_test_case(self):
+ changelog = generate_changelog(PATCH7)
+ assert changelog == EXPECTED7
+
+ @unittest.skipIf(not unidiff_supports_renaming,
+ 'Newer version of unidiff is needed (0.6.0+)')
+ def test_renaming(self):
+ changelog = generate_changelog(PATCH8)
+ assert changelog == EXPECTED8
diff --git a/contrib/vimrc b/contrib/vimrc
index bbbe1dd..c207eea 100644
--- a/contrib/vimrc
+++ b/contrib/vimrc
@@ -28,17 +28,23 @@
function! SetStyle()
let l:fname = expand("%:p")
+ let l:ext = fnamemodify(l:fname, ":e")
+ let l:c_exts = ['c', 'h', 'cpp', 'cc', 'C', 'H', 'def', 'java']
if stridx(l:fname, 'libsanitizer') != -1
return
endif
- setlocal tabstop=8
- setlocal softtabstop=2
- setlocal shiftwidth=2
- setlocal noexpandtab
- setlocal textwidth=80
+ if l:ext != "py"
+ setlocal tabstop=8
+ setlocal softtabstop=2
+ setlocal shiftwidth=2
+ setlocal noexpandtab
+ endif
+ if &filetype == "gitcommit"
+ setlocal textwidth=72
+ else
+ setlocal textwidth=80
+ endif
setlocal formatoptions-=ro formatoptions+=cqlt
- let l:ext = fnamemodify(l:fname, ":e")
- let l:c_exts = ['c', 'h', 'cpp', 'cc', 'C', 'H', 'def', 'java']
if index(l:c_exts, l:ext) != -1
setlocal cindent
setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,f0,h2,p4,t0,+2,(0,u0,w1,m0